From v8 the session status of a tape job has moved to Get-VBRSession. However this new CMDlet lacks the functions we had like LastState, LastResult, LastSession ext. They are now fetchable by arguments.
Why o why is there a difference in approach in getting session information from a 'normal' job and a tape job? This make's programming unlogical... I need to make an version chech to make the script complaint against multiple versions... grrr.
Regards,
Bastiaan
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
$job_session=$job.FindLastSession(); #FindLastSession is not there on tape jobs
$tape_session = Get-VBRSession -Job $tapejob -Last #need to do it like this
It works offcourse, but one and the same approach for all job type's is preferabele.
The name Get-VBRSession is misleading, it's only for tape jobs so why Veeam didn't name it Get-VBRTapeSession is
======================================================
Veeam ProPartner, Service Provider and a proud Veeam Legend
GetLastResult() is dynamic method, while LastResult is static property. Thus, the difference.
While working on PS model for tape functionality, we decided to stick to MS best practices that recommend avoiding usage of dynamic methods on PS objects.
As Get-VBRSession commandlet, we're planning to expand it further in order for it to include sessions of types different than tape one.
We already try to follow the suggested practice at least with commandlets.
However, the internal properties and methods change inside product db with every product version. And it's not possible to preserve two versions in this case.