How would I stop an Instant-Restore job named "job1"?

PowerShell script exchange

How would I stop an Instant-Restore job named "job1"?

Veeam Logoby electricd7 » Mon Apr 13, 2015 6:52 pm

Simple question, lets say I have an instant-restore job named "job1" and I just want to stop that job from the powershell command line. How would I go about doing this?
electricd7
Expert
 
Posts: 103
Liked: 5 times
Joined: Tue Mar 27, 2012 10:13 pm
Full Name: Chad Killion

Re: How would I stop an Instant-Restore job named "job1"?

Veeam Logoby v.Eremin » Tue Apr 14, 2015 10:56 am

You should assign Instant Recovery session to a variable ($IRsession, for instance) and, then, stop it via Stop-VBRInstantRecovery commandlet.

Code: Select all
Stop-VBRInstantRecovery -InstantRecovery $IRSession


Thanks.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: How would I stop an Instant-Restore job named "job1"?

Veeam Logoby electricd7 » Tue Apr 14, 2015 3:30 pm

I used the following:

Get-VBRInstantRecovery | where {$_.VMName -eq "vmname"} | Stop-VBRInstantRecovery
electricd7
Expert
 
Posts: 103
Liked: 5 times
Joined: Tue Mar 27, 2012 10:13 pm
Full Name: Chad Killion

Re: How would I stop an Instant-Restore job named "job1"?

Veeam Logoby v.Eremin » Tue Apr 14, 2015 5:30 pm

Yep, Get-VBRInstantRecovery might be used in cases when you haven't assigned IR session to a variable in the beginning of the script. Either way (with or without variable) it should work fine. Thanks.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 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