-
- Influencer
- Posts: 10
- Liked: 3 times
- Joined: May 07, 2021 4:43 pm
- Full Name: Brent Gardner
- Contact:
Get encryption key for specific job
Trying to audit encryption settings on our backup and offsite-copy jobs.
Sadly, looks like there's no Get-VBRJobAdvancedStorageOptions cmdlet.
How can I determine which encryption key is being used by a specific job?
I'd rather not have to click through tens of jobs to get this from the GUI.
Of course, I'm not looking for the actual secure string. But if I could get the ID then I could cross-reference with output from Get-VBREncryptionKey to get the human-meaningful description.
Regards,
Sadly, looks like there's no Get-VBRJobAdvancedStorageOptions cmdlet.
How can I determine which encryption key is being used by a specific job?
I'd rather not have to click through tens of jobs to get this from the GUI.
Of course, I'm not looking for the actual secure string. But if I could get the ID then I could cross-reference with output from Get-VBREncryptionKey to get the human-meaningful description.
Regards,
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Get encryption key for specific job
Hi Brent,
You can easily get the id of the encryption key being used in a job with the following code:
Thanks,
Oleg
You can easily get the id of the encryption key being used in a job with the following code:
Code: Select all
$job = Get-VBRJob -Name 'Backup Job'
$job.UserCryptoKey.Id
Oleg
-
- Influencer
- Posts: 10
- Liked: 3 times
- Joined: May 07, 2021 4:43 pm
- Full Name: Brent Gardner
- Contact:
Re: Get encryption key for specific job
Works beautifully.
I was using Get-VBRComputerBackupJob as my starting point, which doesn't have the UserCryptoKey property.
Thanks!
I was using Get-VBRComputerBackupJob as my starting point, which doesn't have the UserCryptoKey property.
Thanks!
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Get encryption key for specific job
I see no problems with Get-VBRComputerBackupJob either. It's just that the object structure is a bit different here:
I would advise using Get-VBRComputerBackupJob cmdlet in your case as Get-VBRJob doesn't support agent management jobs.
Thanks,
Oleg
Code: Select all
$job = Get-VBRComputerBackupJob -Name 'Linux Backup'
$job.StorageOptions.EncryptionKey.Id
Thanks,
Oleg
-
- Influencer
- Posts: 10
- Liked: 3 times
- Joined: May 07, 2021 4:43 pm
- Full Name: Brent Gardner
- Contact:
Re: Get encryption key for specific job
Nice.
Simpler code, faster, and I don't get warnings about Get-VBRJob and computer backup jobs.
Regards,
Brent
Simpler code, faster, and I don't get warnings about Get-VBRJob and computer backup jobs.
Regards,
Brent
-
- Veteran
- Posts: 942
- Liked: 53 times
- Joined: Nov 05, 2009 12:24 pm
- Location: Sydney, NSW
- Contact:
Re: Get encryption key for specific job
Hi @Oleg,oleg.feoktistov wrote: ↑May 07, 2021 5:17 pm Hi Brent,
You can easily get the id of the encryption key being used in a job with the following code:Thanks,Code: Select all
$job = Get-VBRJob -Name 'Backup Job' $job.UserCryptoKey.Id
Oleg
In the script:
Code: Select all
$AllBackupJobs = Get-VBRJob | Where-Object { $_.TypeToString -eq 'VMware Backup' }
ForEach($BackupJob in $AllBackupJobs) {
$BackupJob.GetJobDisplayName()
$BackupJob.UserCryptoKey
$BackupJob.UserCryptoKey.Id
}
--
/* Veeam software enthusiast user & supporter ! */
/* Veeam software enthusiast user & supporter ! */
-
- Product Manager
- Posts: 9848
- Liked: 2607 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: Get encryption key for specific job
Better check for StorageEncryptionEnabled as explained in your other topic about the same question.
Please don‘t use 4 topics to solve one issue.
If you change the settings for existing jobs, an active full is required before the backups are encrypted.
Thanks
Fabian
Please don‘t use 4 topics to solve one issue.
The backup job may have encryption enabled, but that doesn‘t mean your backups are already encrypted.then the backup is not encrypted, but when any of those two has a value, then it is successfully encrypted
If you change the settings for existing jobs, an active full is required before the backups are encrypted.
Thanks
Fabian
Product Management Analyst @ Veeam Software
-
- Veteran
- Posts: 942
- Liked: 53 times
- Joined: Nov 05, 2009 12:24 pm
- Location: Sydney, NSW
- Contact:
Re: Get encryption key for specific job
Hi @Mildur,
yes, I can now get the status correctly using the StorageEncryptionEnabled property.
Thank you for the pointer to this.
yes, I can now get the status correctly using the StorageEncryptionEnabled property.
Thank you for the pointer to this.
--
/* Veeam software enthusiast user & supporter ! */
/* Veeam software enthusiast user & supporter ! */
Who is online
Users browsing this forum: No registered users and 8 guests