Search found 3 matches

by logicassault
26 Apr 2021 11:22
Forum: DOS Batch Forum
Topic: output computer, AD User
Replies: 4
Views: 4098

Re: output computer, AD User

Perfect. thanks.
by logicassault
23 Apr 2021 14:18
Forum: DOS Batch Forum
Topic: output computer, AD User
Replies: 4
Views: 4098

Re: output computer, AD User

I got it almost working.. @Echo OFF For /F "Usebackq Delims=" %%# in ("C:\users\user\desktop\List.txt") do ( for /F "tokens=1" %%f in ('query user /server:%%# ^| find "Active"') do ( for /F "skip=1 tokens=1,2" %%u in ('dsquery user -samid %%f^|dsget user -display') do ( if not %%u=="dsget succeeded"...
by logicassault
23 Apr 2021 12:20
Forum: DOS Batch Forum
Topic: output computer, AD User
Replies: 4
Views: 4098

output computer, AD User

I'm trying to have a batch file read a list of computers from a text file and do a query to the computer for the active username and then do a dsquery to get the display name for the associated username. Then output the results of COMPUTERNAME and the DISPLAYNAME it finds in AD for the user. @Echo O...