← script library

Force a Windows Shutdown with PowerShell

System AdministrationAugust 17, 2026

One line that shuts a machine down immediately, ignoring applications that would otherwise block it. Kept as its own entry because it is the right tool for a lab host or an emergency, and because there is a managed reboot script for every case where you want the machine to come back.

powershell
# Force a host shutdown
#-----------------------------------

Stop-Computer -Force

Run it across your fleet

This script runs as-is on a single host. Paste it into ServerEngine to schedule it, run it on a whole server group in parallel, and keep the credentials out of the file — see the scripts documentation and the credential store.

Ready when you are.

Try ServerEngine free for 7 days.