However, I now see that the "Get-VBRJob" cmdlet is obsolete.
What cmdlet can I use instead which will get details about VM jobs and Agent jobs? Or how can I tell the difference between them, before calling the Get-VBRJob cmdlet, so I then know to use either Get-VBRJob or Get-VBRComputerBackupJob?
Any pointers would be much appreciated.
Cheers, tig.
Get-VBRJob cmdlet is obsolete for agent jobs only. You need to use Get-VBRComputerBackupJob and Get-VBRComputerBackupCopyJob instead to retrieve more relevant info.
You can filter them all out by JobType primarily to writing to a variable:
would it be possible to add -JobType parameter to Get-VBRJob to avoid this warning? It would also make searching specific type of jobs a lot easier ...
Honestly, I don't see a huge benefit from -JobType parameter as it covers a single job type inclusion at a time.
When it would come to retrieving jobs of several job types or excluding one, you would still need to use where-object filtering.
But maybe I'm wrong?
when i need for example only those few backup copy jobs from 100 of all, that would be huge benefit. Especially because Snapin could filter those jobs, not my script. And it could save network traffic when script connects over network ...
Being able to filter jobs by ID would also be a huge benefit, when ID is known. Or by being scheduled ( like
In current circumstances implementing -JobType parameter won't help neither with preventing a warning from appearing, nor with saving network traffic - all jobs retrieved with Get-VBRJob are of CBackupJob type. So, to filter them it would still involve parsing them all first.
But you gave me an idea on how it can be solved on the backend. I just need to discuss it with developers.
Also noted your suggestions on -Id and -Scheduled options.