PowerShell script exchange
Post Reply
dan11
Novice
Posts: 8
Liked: 2 times
Joined: Feb 25, 2015 9:10 am
Contact:

Get-VBRTapeJob different in Version 8?

Post by dan11 »

Hello

I've been using the Get-VBRTapeJob in a script to get the LastStatus and LastResult state.

Code: Select all

$jobs = Get-VBRTapeJob -Name "Weekly_Backup*"
foreach($jobtoshow in $jobs)
{
   if ($jobtoshow.GetLastState() -ne "Stopped" -Or $jobtoshow.GetLastResult() -ne "Success")
 ...
After upgrade to Veeam Version 8 the script stopped working.
I found out, that the commands don't work anymore like this.

I had to change $jobtoshow.GetLastState() and $jobtoshow.GetLastResult() to $jobtoshow.LastState and $jobtoshow.LastResult

Are there more commands changed in Version 8?

Thank you

Daniel
Dima P.
Product Manager
Posts: 14720
Liked: 1705 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Get-VBRTapeJob different in Version 8?

Post by Dima P. »

Daniel,
The described behavior is correct. v.Eremin should be aware of all the changes, so kindly await for his response.
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get-VBRTapeJob different in Version 8?

Post by veremin »

In version 8 the tape PS model has been revised seriously to add missing functionality and improve previously existed drawbacks.

While we're trying to preserve backward functionality, some commandlets, as well as, objects' parameters have been changed and sometimes even replaced with alternatives.

As mentioned here, LastStatus and LastResult are now static parameters, not dynamic methods. Thus, the code should be changed slightly to reflect the changes. But as I can see you've done it already.

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests