Search found 3 matches

by Rob
01 May 2014 14:37
Forum: DOS Batch Forum
Topic: "dsquery computer -name" to print *all* results trimmed
Replies: 5
Views: 4959

Re: "dsquery computer -name" to print *all* results trimmed

Scratch my last reply - I figured it out. I added , to delims It now looks like this: for /f "tokens=2 delims=,=" %%a in ('dsquery computer -name FAI%User%*' ) do echo %%~a Thanks so much for taking the time to help me out with this! Turns out it was a whole lot easier to do than I had tho...
by Rob
01 May 2014 14:29
Forum: DOS Batch Forum
Topic: "dsquery computer -name" to print *all* results trimmed
Replies: 5
Views: 4959

Re: "dsquery computer -name" to print *all* results trimmed

Hey, thanks for the incredibly fast response!

This works great, only it spits out
CompName=FAIJDOE,OU
CompName=FAIJDOE1,OU
etc.

Is there an easy way to get rid of the ',OU' at the end?
by Rob
01 May 2014 14:11
Forum: DOS Batch Forum
Topic: "dsquery computer -name" to print *all* results trimmed
Replies: 5
Views: 4959

"dsquery computer -name" to print *all* results trimmed

Hey all. I'm new to Batch scripting and I'm toying around with creating a simple tool to unlock domain accounts, reset passwords, and provide the names of all computers containing the user's name. I'm working on using the "dsquery" command to list all the computer names within Active Direc...