So I have a ton of computers that are all on the same domain. I would like to pick out a majority of those machines lets say 30 or so and execute a script that I wrote on all of them at once. Without having to go to each individual machine and execute it. I know the names of al开发者_如何学编程l the machines I would like to execute the script on, and they are all logged into the domain.
Is there a way this could be done?
Thank You for your time.
Create an OU in Active Directoy, move the computers that you want the script to run on into this OU, create a GPO that targets this OU, use the GPO settings to run your script on all computers in the OU. This is the RIGHT way to do this if you have an AD domain.
Assuming you don't have another management system that could do this for you (like M$ SCCM, Symantec/Altiris), an easy and flexible (and free) option for remote execution is Sysinternals' PSEXEC command. To use it you would run a command like psexec \\target1,\\target2 -u yourusername -p yourpassword -c yourscript.vbs
精彩评论