PowerShell script exchange
Post Reply
albertwt
Veteran
Posts: 879
Liked: 46 times
Joined: Nov 05, 2009 12:24 pm
Location: Sydney, NSW
Contact:

Getting the credentials used by the backup job ?

Post by albertwt »

Hi People,

I need to know which backup job is using the specific credential listed under the Manage Credentials?
https://helpcenter.veeam.com/docs/backu ... ml?ver=110

The PowerShell cmdlet below can't show which backup job is using which specific credential.
https://helpcenter.veeam.com/docs/backu ... ml?ver=110

Your help will be greatly appreciated.

Thank you.
--
/* Veeam software enthusiast user & supporter ! */
Mildur
Product Manager
Posts: 8678
Liked: 2277 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Getting the credentials used by the backup job ?

Post by Mildur » 1 person likes this post

Hi Albert

Your „powershell below“ link is a list of 10-14 powershell commands. I assume you want to use get-vbrjob?
If yes, you already have example commands in the other two topics you commented or have created.
I‘m not sure if it‘s helpful to use this as a third topic to discuss the same issue or goal. But if the issues/goals are not connected to each other, I‘m looking forward to assist you in this topic too.

Thanks
Fabian
Product Management Analyst @ Veeam Software
albertwt
Veteran
Posts: 879
Liked: 46 times
Joined: Nov 05, 2009 12:24 pm
Location: Sydney, NSW
Contact:

Re: Getting the credentials used by the backup job ?

Post by albertwt »

Hi Fabian,

No, the issue is not connected, when I am looking at the cmdlet result below:

Code: Select all

Get-VBRJob | Get-Member
Get-VBRBackup | Get-Member
There are no lines that return or even mentioned the service account in use.

or am I looking in the wrong direction to get the currently active service account in use?
--
/* Veeam software enthusiast user & supporter ! */
Mildur
Product Manager
Posts: 8678
Liked: 2277 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Getting the credentials used by the backup job ?

Post by Mildur » 1 person likes this post

Hi Albert

Thanks.
There seemed to be a misunderstanding on my side. I though it's about encryption key.
Let me check if we have a cmdlet.
One question. Do you have configured the credentials on a job level, or do you use Indvidual credentials per vm?

Thanks
Fabian
Product Management Analyst @ Veeam Software
albertwt
Veteran
Posts: 879
Liked: 46 times
Joined: Nov 05, 2009 12:24 pm
Location: Sydney, NSW
Contact:

Re: Getting the credentials used by the backup job ?

Post by albertwt »

@Mildur,

The credentials is set at the job level.
--
/* Veeam software enthusiast user & supporter ! */
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Getting the credentials used by the backup job ?

Post by oleg.feoktistov » 1 person likes this post

Hi,

Try this code:

Code: Select all

$job = Get-VBRJob -Name 'Backup Job 1'
$vssOptions = Get-VBRJobVSSOptions -Job $job
if ($vssOptions.WinCredsId) {
 Get-VBRCredentials | where {$_.Id -eq $vssOptions.WinCredsId}
}
elseif ($vssOptions.LinCredsId) {
Get-VBRCredentials | where {$_.Id -eq $vssOptions.LinCredsId}
}
Thanks,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests