power restart script tweaks
-# This script will force the computer to finish installing updates
-# and restart. Normal restart doesn't install updates before issuing
-# a reboot command. This one does.
+# This script will force restart computer. Add command paramter: shutdown to shutdown instead
+# Normal restart doesn't install updates before issuing
$param1 = $args[0]
-Restart-Computer -ComputerName $env:COMPUTERNAME -Force
-
if ($param1 -eq 'shutdown') {
Stop-Computer -ComputerName $env:COMPUTERNAME -Force
}
+else {
+ Restart-Computer -ComputerName $env:COMPUTERNAME -Force
+}
\ No newline at end of file
