2021-04-21 13:40:07 +00:00
|
|
|
# This script will force restart computer. Add command paramter: shutdown to shutdown instead
|
|
|
|
# Normal restart doesn't install updates before issuing
|
2021-04-13 20:10:37 +00:00
|
|
|
|
2021-04-21 13:29:25 +00:00
|
|
|
$param1 = $args[0]
|
|
|
|
|
|
|
|
if ($param1 -eq 'shutdown') {
|
|
|
|
Stop-Computer -ComputerName $env:COMPUTERNAME -Force
|
2021-04-21 13:40:07 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
Restart-Computer -ComputerName $env:COMPUTERNAME -Force
|
2021-04-21 13:29:25 +00:00
|
|
|
}
|