Get-VBRTapeJob different in Version 8?

PowerShell script exchange

Get-VBRTapeJob different in Version 8?

Veeam Logoby dan11 » Wed Aug 05, 2015 12:08 pm


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

Posts: 8
Liked: 1 time
Joined: Wed Feb 25, 2015 9:10 am

Re: Get-VBRTapeJob different in Version 8?

Veeam Logoby Dima P. » Wed Aug 05, 2015 3:57 pm

The described behavior is correct. v.Eremin should be aware of all the changes, so kindly await for his response.
Dima P.
Veeam Software
Posts: 7015
Liked: 507 times
Joined: Mon Feb 04, 2013 2:07 pm
Location: SPb
Full Name: Dmitry Popov

Re: Get-VBRTapeJob different in Version 8?

Veeam Logoby v.Eremin » Tue Aug 11, 2015 4:25 pm

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 [url=
powershell-f26/tape-media-pool-report-ps-script-no-longer-works-in-v8-t25040.html?hilit=LastState#p136850]here[/url], 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.

Veeam Software
Posts: 14023
Liked: 1051 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Return to PowerShell

Who is online

Users browsing this forum: No registered users and 1 guest