I have been using Andy's started script for creating jobs and have tried to alter it to work with VSS credentials in v7. It does everything its supposed to, but no matter what I do, it will not set the VSS default or per-vm credentials on the job. Just leaves the drop down blank. The block looks like the following:
- Code: Select all
$jobnameobject = Get-VBRJob -Name $CreateJobName
$jobnameobjectVSS = $jobnameobject | Get-VBRJobVSSOptions
$CredentialsVSSDefault = Get-VBRCredentials -name "*veeam.svc*"
$jobnameobjectVSS.Credentials = $CredentialsVSSDefault
$jobnameobject | Set-VBRJobVSSOptions -Options $jobnameobjectVSS
Just doen't seem to stick. If I fun "Get-VBRCredentials -name "*veeam.svc*" from powershell I get the return of the credential set I want, but it won't alter the job for some reason. What am I doing wrong?