Shutting Down Computers Remotely

WMI not only provides rich information, it also supplies methods that you can call to take action. In the next example, you can forcefully shut down a remote system as long as you have appropriate privileges and there is no firewall blocking your way:

$os = Get-WmiObject Win32_OperatingSystem -computerName 10.10.10.10
$os.Win32Shutdown(6,0)

Posted Mar 16 2009, 08:00 AM by ps1

Comments

ikroumov wrote re: Shutting Down Computers Remotely
on 04-08-2009 9:44 AM

This is an extremely powerful command. Be careful whenever you are using it

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.