Skip to content

reboot

Reboots the computer (needs admin rights)

#Requires -Version 5.1

#Requires -RunAsAdministrator

try {
	if ($IsLinux) {
		& sudo reboot
	} else {
		Restart-Computer
	}
	exit 0
} catch {
throw
}

This script has no configurable parameters.

An interactive directory of PowerShell scripts.