Can't get VSS credentials to stick...

PowerShell script exchange

Can't get VSS credentials to stick...

Veeam Logoby electricd7 » Mon 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?
electricd7
Expert
 
Posts: 103
Liked: 5 times
Joined: Tue Mar 27, 2012 10:13 pm
Full Name: Chad Killion

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

Veeam Logoby v.Eremin » Tue 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.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

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

Veeam Logoby electricd7 » Tue Nov 05, 2013 1:18 pm

Yes that worked. Thanks!
electricd7
Expert
 
Posts: 103
Liked: 5 times
Joined: Tue Mar 27, 2012 10:13 pm
Full Name: Chad Killion

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

Veeam Logoby v.Eremin » Tue Nov 05, 2013 1:28 pm

You’re welcome. Should any additional help be needed, don’t hesitate to let us know.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests