Simple Powershell command for replication status

PowerShell script exchange

Simple Powershell command for replication status

Veeam Logoby tsukraw » Fri Feb 21, 2014 2:46 am

Hey Guys,
So i have absolutely no powershell experience and wondering if anyone can help me come up with a simple script. I've looked around the forums and haven't found quite what i am looking for.
All i want is a script that simply tells me the status of a replication job (Success/Warning/Fail)
That simple answer we are going to output to a csv/txt file.

We have a MySql database/web interface that we use with a number of other programs for alerts/monitoring.
So like the other programs we would daily have that csv/txt file imported into the database as part of a general successful/warning/failed replication history.

Would it be easy to make such a script to provide that simple answer output?
I suppose there should maybe be a start/end time stamp on the output as well so we know were getting current outputs.

thanks
tsukraw
Service Provider
 
Posts: 26
Liked: 2 times
Joined: Fri Jul 06, 2012 8:28 pm
Full Name: Tucker Sukraw

Re: Simple Powershell command for replication status

Veeam Logoby damadhatter » Fri Feb 21, 2014 5:32 am

Are you speaking of Labtech by chance?
damadhatter
Influencer
 
Posts: 24
Liked: never
Joined: Fri Feb 21, 2014 5:15 am
Full Name: Chris A

Re: Simple Powershell command for replication status

Veeam Logoby v.Eremin » Fri Feb 21, 2014 9:25 am

The latest replication job result can be gotten via .GetLastResult() method:

Code: Select all
Asnp VeeamPSSnapin
$Job = Get-VBRJob -name "Name of your replication job"
$Job.GetLastResult()

If you're after listing the job statuses of all replication jobs, then, you will have to write a cycle, within which the statuses will be listed along with the replication job names.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 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 6 guests