major change to override Write-Error func

This commit is contained in:
2023-10-05 13:17:18 -04:00
parent bbb4884818
commit 5f4b4565de
42 changed files with 114 additions and 114 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ If (! ($(Get-Service -Name 'spooler').StartType -eq "Disabled") ) {
## Delete all print jobs
Write-Output "Deleting all print jobs from ""${Env:WINDIR}\System32\spool\PRINTERS"""
Try { Remove-Item "${Env:WINDIR}\System32\spool\PRINTERS\*" -Recurse }
Catch { LogErr $_.Exception.Message }
Catch { Write-Error $_.Exception.Message }
## Start the spooler service
Control-Service -Start -Name $SERVICE