PowerShell script exchange
Post Reply
electricd7
Expert
Posts: 121
Liked: 7 times
Joined: Mar 27, 2012 10:13 pm
Full Name: Chad Killion
Contact:

Can't get VSS credentials to stick...

Post by electricd7 »

Hello-

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?
veremin
Product Manager
Posts: 20271
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Can't get VSS credentials to stick...

Post by veremin »

Hi, Chad,

In order to set specific credentials you have to change the above mentioned script slightly:

Code: Select all

$jobnameobject = Get-VBRJob -Name $CreateJobName
$CredentialsVSSDefault = Get-VBRCredentials -name "*veeam.svc*"
$jobnameobject | Set-VBRJobVssOptions -Credentials $CredentialsVSSDefault
Hope this helps.
Thanks.
electricd7
Expert
Posts: 121
Liked: 7 times
Joined: Mar 27, 2012 10:13 pm
Full Name: Chad Killion
Contact:

Re: Can't get VSS credentials to stick...

Post by electricd7 »

Yes that worked. Thanks!
veremin
Product Manager
Posts: 20271
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Can't get VSS credentials to stick...

Post by veremin »

You’re welcome. Should any additional help be needed, don’t hesitate to let us know.
Post Reply

Who is online

Users browsing this forum: oscarm and 20 guests