Common commands for rebooting a Windows server remotely during pentests.
A few different ways to trigger a remote reboot on a Windows host, useful when a change (like disabling a service or installing an update) needs a restart to take effect.
Invoke-CimMethod -ComputerName someserver -ClassName Win32_OperatingSystem -MethodName Reboot # Preferred - uses CIM/WinRMInvoke-WmiMethod -ComputerName someserver -Class Win32_OperatingSystem -Name Reboot # Older WMI equivalentwmic os where Primary='TRUE' call reboot # WMIC equivalent, run locally or with /node:To reboot the local machine instead of a remote one:
shutdown /r /t 0



