@dsquery computer "OU=YourOU,DC=Domain,DC=Net" -limit 0 -o rdn > Computers_YourOu_domain_net.txt
Result will be savec in a file Computers_YourOu_domain_net.txt that will be like this:
"computer1"
"computer2"
"computer3"
Now you can use it to run a script on each OU's computers :-)
No comments:
Post a Comment