I have a pre-script script in powershell that checks if a file is not open before starting the backup. If its open, it will fail with exit code.
It works ok, but i would like to know if i can costomize the output in "Details" in the job log.
Today i have this :
Running pre-freeze script
Error: Script finished execution with unexpected exit code: 1
Is there a way to costomize the output in the job ? I have the part of the job that gives the error bellow
Code: Select all
Write-Error -Message "Error : File open"
Return 1
exit