Added try and catch

This commit is contained in:
Markus Fleschutz
2020-10-05 13:12:12 +02:00
parent 14ab054646
commit 847be37772
25 changed files with 199 additions and 110 deletions

View File

@ -7,5 +7,8 @@
# License: CC0
#Requires -RunAsAdministrator
Stop-Computer
exit 0
try {
Stop-Computer
exit 0
} catch { Write-Error $Error[0] }
exit 1