PowerShell script exchange
Post Reply
jason.massey
Novice
Posts: 3
Liked: never
Joined: Jan 25, 2022 2:37 am
Full Name: Jason Massey
Contact:

Change date for Get-VBRCloudProviderCredential

Post by jason.massey »

When I run Get-VBRCloudProviderCredentials | fl * I have three bits of information:

Id, Name and Description.

Is there a way for me to get when the credentials were last modified like I can with the Get-VBRCredential command.

Thanks,

Jason
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Change date for Get-VBRCloudProviderCredential

Post by oleg.feoktistov »

Hi Jason,

No simple way to do that as VBRCloudProviderCredentials class just doesn't have such property. You would need to render the provider's creds as an object of internal (read "unsupported") type to see last modified time.
For example:

Code: Select all

$provCreds = Get-VBRCloudProviderCredentials -Name 'credsName'
$provCredsConverted = [Veeam.Backup.Core.CCloudProviderCredentials]::Get($provCreds.Id)
$credsConverted = [Veeam.Backup.Core.CDbCredentials]::Get($provCredsConverted.CredsId)
$provCreds | select Id, Name, Description, @{n='LastModified';e={$credsConverted.Credentials.ChangeTimeLocal}}
or:

Code: Select all

$provCredsConverted = [Veeam.Backup.Core.CCloudProviderCredentials]::GetAll()
$credsConverted = [Veeam.Backup.Core.CDbCredentials]::Get($provCredsConverted[0].CredsId)
$provCredsConverted | select CredsId, Name, Description, @{n='LastModified';e={$credsConverted.Credentials.ChangeTimeLocal}}
Hope it helps,
Oleg
jason.massey
Novice
Posts: 3
Liked: never
Joined: Jan 25, 2022 2:37 am
Full Name: Jason Massey
Contact:

Re: Change date for Get-VBRCloudProviderCredential

Post by jason.massey »

Oleg,

That's a tremendous help and give me insight into how I might gather other information if the existing commands come up short.

Thanks again!
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests