Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.
The command works well, I get a list of all users in that specific OU in a text file. Each user is listed in 1 line. But the problem is before the username and after the user name there are white space... How do I remove these whitespaces?
DSQUERY USER OU=firstou,OU=secondou,OU=thirdou,DC=child,DC=domain,DC=domain,DC=com| DSGET USER –SAMID >USERSLIST.TXT