Sorry to add to resolved topic, but I can explain what's happening. BackupJob property is actually a CBackupJob object, not just a normal property:
Code: Select all
PS C:\Users\Administrator> (Get-VBRBackupCopyJob | select BackupJob)|gm
TypeName: Selected.Veeam.Backup.PowerShell.Infos.VBRBackupCopyJob
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
BackupJob NoteProperty CBackupJob[] BackupJob=Veeam.Backup.Core.CBackupJob[]
PS C:\Users\Administrator> (Get-VBRBackupCopyJob | select BackupJob).BackupJob
Job Name Type State Last Result Description
-------- ---- ----- ----------- -----------
vmware-per-job VMware Backup Stopped Success Created by DDOM-VEEAM-RB4\Administrator at 1/19/20...
PS C:\Users\Administrator> (Get-VBRBackupCopyJob | select BackupJob).BackupJob.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True CBackupJob[] System.Array
Any time you see the curly braces {} like this:
Code: Select all
PS C:\Users\Administrator> Get-VBRBackupCopyJob | ft Name,RetentionNumber,BackupJob | Format-Table -Wrap -Autosize
Name RetentionNumber BackupJob
---- --------------- ---------
12.1-backup-copy 7 {vmware-per-job} <==== that entry
It's likely an object. You can call specific properties from objects in Select-Object calls like the following:
Code: Select all
PS C:\Users\Administrator> Get-VBRBackupCopyJob | Select Name, RetentionNumber, @{n="SourceJob Name";e={$_.BackupJob.Name}}
Name RetentionNumber SourceJob Name
---- --------------- --------------
12.1-backup-copy 7 vmware-per-job
the format is:
@{name="display name for shell output";expression={here you can write code block; I use $_.BackupJob.Name to get the name}}
you can shorten Name= and Expression= to n= and e= respectively. I recommend this as opposed to playing with Format-Table as it just means you have deeper understanding of what data you're working with and you'll get fewer surprises when trying to export to other formats.