PowerShell script exchange
Post Reply
mwpreston
Enthusiast
Posts: 73
Liked: 9 times
Joined: May 25, 2010 3:27 pm
Full Name: mike
Contact:

Get-VSBJob not returning the last result properly

Post by mwpreston »

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
Enthusiast
Posts: 73
Liked: 9 times
Joined: May 25, 2010 3:27 pm
Full Name: mike
Contact:

Re: Get-VSBJob not returning the last result properly

Post by mwpreston »

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

Not sure what is going on here....
ThomasMc
Veteran
Posts: 293
Liked: 19 times
Joined: Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell
Contact:

Re: Get-VSBJob not returning the last result properly

Post by ThomasMc »

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 :)
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests