mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 05:04:39 +02:00
Added try and catch
This commit is contained in:
@ -7,5 +7,8 @@
|
||||
# License: CC0
|
||||
|
||||
#Requires -RunAsAdministrator
|
||||
Stop-Computer
|
||||
exit 0
|
||||
try {
|
||||
Stop-Computer
|
||||
exit 0
|
||||
} catch { Write-Error $Error[0] }
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user