0

I can't seem to find a way to reboot a remote computer using CIM for a 2008 server. All I have found was Restart-PcsvDevice but this doesn't work for 2008 servers. Is there a way to use CIM to reboot 2008 servers? I have to use CIM because of the DCOM protocol that is needed for my network.

Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328
Keith
  • 689
  • 10
  • 27

1 Answers1

1

I fail to see why the use of DCOM in your network would prevent you from also using WinRM, but whatever. If you must use WMI/CIM for this you can do so by invoking the Reboot method of the Win32_OperatingSystem class on the remote host:

Invoke-CimMethod -Computer someserver -Class Win32_OperatingSystem -Method Reboot

Note that the CIM cmdlets were introduced with PowerShell v3, which does not ship with Windows Server 2008 or 2008 R2, so you may need to use Invoke-WmiMethod instead, or upgrade to PowerShell v3 or newer.

Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328