I am seeing warnings from my backup copy job that runs a powershell script on job completion.
its a pretty simple job:
Code: Select all
if ( (Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue) -eq $null )
{Add-PsSnapin VeeamPSSnapIn}
[string]$veeamServer = "myserver"
# create a credential for the service account
[string]$UserName = "username"
[string]$passwordText = Get-Content "path-to-secure-file"
[SecureString]$securePwd = $passwordText | ConvertTo-SecureString
[pscredential]$credOject = New-Object System.Management.Automation.PSCredential ($UserName, $securePwd)
#connect to Veeam Server
$vbrobject = Connect-VBRServer -Server $veeamServer -Credential $credOject
#execute the repository rescan
Get-VBRBackupRepository -Name "Repository" | Sync-VBRBackupRepository | Out-Null
#disconnect from VBR server
Disconnect-VBRServer | Out-Null
Exit(0)
The script DOES execute properly, so I'm not sure where this exit code is coming from.