tacticalrmm/scripts/Win_Power_RestartorShutdown...

11 lines
329 B
PowerShell

# This script will force restart computer. Add command paramter: shutdown to shutdown instead
# Normal restart doesn't install updates before issuing
$param1 = $args[0]
if ($param1 -eq 'shutdown') {
Stop-Computer -ComputerName $env:COMPUTERNAME -Force
}
else {
Restart-Computer -ComputerName $env:COMPUTERNAME -Force
}