major change to override Write-Error func
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user