Prophecy Posted August 28, 2008 Share Posted August 28, 2008 (edited) Okay the time has come for me to really master pstools, Id like to use a gui program like fepstools or speccopssoftware but pstools is quicker in most cases then loading these programs and dealing with the little bugs. My first script I would like to use psexec.exe to force all computers on the domain to run gpupdate /force The next script I would like to write would pstools psshutdown to tell all machines to perform a forced reboot The last thing using the scheduler in 2k3 to run psshutdown and force remote reboots every saturday night on the machines. I appreciate the help in advanced Edited August 28, 2008 by Prophecy Link to comment Share on other sites More sharing options...
random_n Posted August 28, 2008 Share Posted August 28, 2008 Each of those are simple one-liners with the PsTools. 1. psexec -accepteula \\* gpupdate /force 2. psexec -accepteula -c \\* psshutdown -accepteula -r -f -t 0 3. Make a scheduled task with the command immediately above, scheduled for whenever you like :) Make sure to run the commands from an account with Domain Admin privileges, as shutting down systems requires local "Administrators" group membership, and by default only members of Domain Admins are part of said group. Also, you can thank Microsoft for all those "-accepteula" switches, too. ;) Link to comment Share on other sites More sharing options...
Joel Posted August 29, 2008 Share Posted August 29, 2008 My first script I would like to use psexec.exe to force all computers on the domain to run gpupdate /force What's your goal with this one? Link to comment Share on other sites More sharing options...
Prophecy Posted August 29, 2008 Author Share Posted August 29, 2008 To update group policies settings on the the machines then rather then waiting for the scheduled time. Working on this one now psexec -accepteula \\* gpupdate /force but i modified mine with a txt file so its pseexec -accepteulla @computers.txt gpupdate /force psexec -accepteula -c @computers.txt -accepteula -r -f -t 0 -v "Systems are currently being restarted" (This good as well?) Link to comment Share on other sites More sharing options...
Joel Posted August 29, 2008 Share Posted August 29, 2008 To update group policies settings on the the machines then rather then waiting for the scheduled time. I'll rephrase; what policy do you hope to refresh that doesn't require a relogin (user) or a restart (computer)? Link to comment Share on other sites More sharing options...
Prophecy Posted August 29, 2008 Author Share Posted August 29, 2008 Defining port exceptions for the windows firewall. Link to comment Share on other sites More sharing options...
Joel Posted August 29, 2008 Share Posted August 29, 2008 OK. Is there a reason you rely on a software solution, as opposed to a hardware solution to manage your network's traffic? Link to comment Share on other sites More sharing options...
Joel Posted August 29, 2008 Share Posted August 29, 2008 http://www.windowsecurity.com/articles/How...Processing.html Does that help? Why script something that you need to happen NOW, as opposed to later? Wouldn't you just run what you want so that it affects the remote machines? Link to comment Share on other sites More sharing options...
Prophecy Posted September 9, 2008 Author Share Posted September 9, 2008 http://www.windowsecurity.com/articles/How...Processing.htmlDoes that help? Why script something that you need to happen NOW, as opposed to later? Wouldn't you just run what you want so that it affects the remote machines? I say scripts in the wrong tense. I just wanted to get my syntax correct more then anything. I like the specopssoftware from that article it just worries me abit, ive used it before and it gets high reviews however always worries me to install that kind of software on servers. Anyways I appreciate it. Thanks Prophecy Link to comment Share on other sites More sharing options...
Recommended Posts