Hey Hari,
I'd advise against using the internal methods as you never know when they will change in future releases.
All of the job types have nominal Get-VBR[something]Sessions.
Get-VBRBackupSession == Most Backup sessions
Get-VBRComputerBackupJobSession == Agent backup sessions created in Veeam console
Get-VBRSession == Pass a Tape Job object to -Job parameter to get the Job Sessions.
To sort by creation time, you would then do something like:
Code: Select all
PS C:\Users\Administrator> $Sessions = Get-VBRComputerBackupJobSession
PS C:\Users\Administrator> $Sessions | sort -Property CreationTime -Descending | select JobId, CreationTime | select -First 5
JobId CreationTime
----- ------------
6960378f-b069-4b09-a078-d18b2a283ff6 1/14/2022 14:15:18
28fbf96a-ffcf-4006-bcd3-40d392fce589 1/14/2022 14:14:27
6960378f-b069-4b09-a078-d18b2a283ff6 1/14/2022 14:10:42
28fbf96a-ffcf-4006-bcd3-40d392fce589 1/14/2022 14:10:27
6960378f-b069-4b09-a078-d18b2a283ff6 1/14/2022 14:06:06
(Note: The last two selects I added just for readbility sake -- there's no need for them or you can customize what properties you want to show in your output)
And I found these online and where does is it documented about these type of commands
These are dotNet methods that you're calling via Powershell Reflection. These are not supported and not documented as a result. Even minor patches typically change method names, so it's always a gamble that your script might stop working when using these on updates. It's best to stay to the supported endpoints listed in this user guide article:
https://helpcenter.veeam.com/docs/backu ... ml?ver=110