PowerShell script exchange
Post Reply
electricd7
Expert
Posts: 117
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 » Nov 04, 2013 8:42 pm

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: 16904
Liked: 1440 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin » Nov 05, 2013 9:29 am

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: 117
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 » Nov 05, 2013 1:18 pm

Yes that worked. Thanks!

veremin
Product Manager
Posts: 16904
Liked: 1440 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin » Nov 05, 2013 1:28 pm

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: No registered users and 6 guests