----------------------------
########################################################################### # # Shutdown Test and Dev servers # # Created Aug 27, 2010 # Bryan Loveless # # # # Requires Powershell 2.0 # # Change your Execution policy to RemoteSigned if running locally # by: Set-executionpolicy -executionpolicy RemoteSigned # #Prereqs: # #Caviots: # # # ########################################################################### $Victims="devserverWINSname1","testserverWINSname1","devserverWINSname2" $shutdownjob = stop-computer -computername $victims -throttlelimit 5 AsJob #throttle limit is how many commands to send at once, this can be many, many more than 5 if you wish Write-Host $shutdownjobRun this script and those machines named will be down before you know it.
No comments:
Post a Comment