mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 21:07:40 +02:00
Improve the error message line
This commit is contained in:
@ -28,6 +28,6 @@ try {
|
||||
Register-ScheduledTask -Action $Task -Trigger $Trigger -TaskName "Reminder_$Random" -Description "Reminder"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
|
Reference in New Issue
Block a user