Hi RubinCompServ,
>Is it just my environments, or is the Get-VBRBackupSession incredibly slow?
Unfortunately very much so a situation where "it depends".
Get-VBRBackupSession can indeed be a bit slow as it currently does not allow for filtering without first doing a lot of processing as you can only filter by -Name and -Id
Get-VBRSession has the -Job and -Type parameters, and in my experience these tend to be a bit faster. Additionally, it returns an object with less properties, but typically enough for reporting purposes. And furthermore, if you need the full data like is returned from Get-VBRBackupSession, you can pass an array of UUIDs on the -Id parameter to Get-VBRBackupSession which is quite fast to return results.
As to whether it's just your environment, would be difficult to say without some investigation -- can you do a simple test for me and show the output of the following?
Measure-Command -Expression {$sessTotal = Get-VBRBackupSession}
$sessTotal.Count
This will take awhile to run, but would be curious how long and also how many sessions total you have. If you're not
limiting the retained Session History, there may indeed be a large volume of sessions.
I know that doesn't give a direct answer to your question, but regrettably the answer is very much so "it depends".
All in all, for my scripts I've settled on starting with Get-VBRSession and if I need more information, I pass the Ids returned by that to Get-VBRBackupSession, it's typically much faster. In rare cases, I may switch to unsupported .NET methods but would rather avoid that when possible.