Joseph Moody
asked on
Script to export all computers in an OU and Sub-OUs into text file
Hello Everyone!
I am wondering if it is possible to have a script that exports a list of all computers in an OU and any sub OUs into a text file and have each computer name on a separate line. I do not have the faintest idea on where to begin so any help would be great!
Thanks!
I am wondering if it is possible to have a script that exports a list of all computers in an OU and any sub OUs into a text file and have each computer name on a separate line. I do not have the faintest idea on where to begin so any help would be great!
Thanks!
ASKER
Does that grab any computers in sub OUs?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Download and install the Server Resource Kit and use DSQUERY
dsquery computer -o rdn -limit 0 "cn=computers,dc=vch,dc=ca ">Machines .txt
dsquery computer -o rdn -limit 0 "cn=computers,dc=vch,dc=ca
ASKER
That worked perfect (used the vbs solution)! Thanks!
Thanks,
Brian