Sorry David, didn't think to ask if you were just trying to query information for the jobs.
You don't need additional credentials to do that, you can do that with the Veeam native cmdlets as they will utilize the existing connections built with the stored credentials.
Here's a quick example from my lab environment, using the following:
vCenter name: vcsa.veeamlab.local
Repository name: ReFS
Tag to be added to Veeam job: VeeamTagTest
Code: Select all
$vCenterServer = Get-VBRServer -Name 'ausvcenter.lab.fullstackgeek.net'
$Repository = Get-VBRBackupRepository -Name 'ReFS'
$VMwareTag = Find-VBRViEntity -Name 'VeeamTagTest' -Tags -Server $vCenterServer
$TagBackupJob = Add-VBRViBackupJob -Name 'Tag Backup Job' -Description 'Demo backup job for VMware tag created via script' -BackupRepository $Repository -Entity $VMwareTag
Here's what the tag and job object look like afterward:
Code: Select all
$VMwareTag
ConnHostId : fdd958d1-0a04-410a-964f-0f8f9c13a5fe
Type : Tag
Reference : urn:vmomi:InventoryServiceTag:512c257c-4a66-4cce-9578-34bb8df48f4b:GLOBAL
TagQsId : urn:vmomi:InventoryServiceTag:512c257c-4a66-4cce-9578-34bb8df48f4b:GLOBAL
Id : fdd958d1-0a04-410a-964f-0f8f9c13a5fe_urn:vmomi:InventoryServiceTag:512c257c-4a66-4cce-9578-34bb8df48f4b:G
LOBAL
Name : VeeamTagTest
Path : ausvcenter.lab.fullstackgeek.net\VeeamBackup (Tags for Backup Jobs)\VeeamTagTest (Job Tag for Veeam Backups)
Description : Job Tag for Veeam Backups
$TagBackupJob | Get-VBRJobObject | Format-Table -AutoSize
Name Type ApproxSize Location
---- ---- ---------- --------
VeeamTagTest Include 0.0 B ausvcenter.lab.fullstackgeek.net\VeeamBackup (Tags for Backup Jobs)\VeeamTagTest (Job Tag for Veeam Backups)
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion