List all computer accounts in an OU

  Active Directory, Windows

Open a commande window, and type this:

DSQUERY COMPUTER "OU=YUL-User+Computers,OU=YUL,DC=NA,DC=manwin,DC=local" -o rdn -limit 1000 > c:\machines.txt

 

This will create a text file on your C:\ drive, with a maximum of 1000 machine names it found in AD.

Change the -limi parameter to whatever you need.

 

Leave a comment