Get-VSBJob not returning the last result properly

PowerShell script exchange

Get-VSBJob not returning the last result properly

Veeam Logoby mwpreston » Mon Jan 30, 2012 4:43 pm

Hi, hopefully I can get some help here....

Basically I have created a script to import some backups and perform surebackup job for each VM individully. This is working great, but rather than recieve an email per job what I want to do is add on to my script to get the status and other information of the Surebackup jobs and send one email.

Problem is, when I look at the job history in the Veeam B&R gui, it shows Last Result as success. When I run get-vsbjob, last result is showed as None.

Any ideas?

Mike
mwpreston
Veeam Vanguard
 
Posts: 73
Liked: 9 times
Joined: Tue May 25, 2010 3:27 pm
Full Name: mike

Re: Get-VSBJob not returning the last result properly

Veeam Logoby mwpreston » Mon Jan 30, 2012 4:53 pm

Actually, just tested, even with the job running, my state is showing stopped!

Not sure what is going on here....
mwpreston
Veeam Vanguard
 
Posts: 73
Liked: 9 times
Joined: Tue May 25, 2010 3:27 pm
Full Name: mike

Re: Get-VSBJob not returning the last result properly

Veeam Logoby ThomasMc » Mon Jan 30, 2012 4:56 pm

That is a bit weird, I've got a SB job thats running and reporting as "Stopped" when I use GetLastState() but Get-VSBSession shows it as working, also noticed the FindLastSession() seems goosed as well, so you'll need to use Get-VSBSession and see if you can tinker it to your needs :)
ThomasMc
Expert
 
Posts: 293
Liked: 17 times
Joined: Wed Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 3 guests