PowerShell script exchange
Post Reply
electricd7
Expert
Posts: 122
Liked: 7 times
Joined: Mar 27, 2012 10:13 pm
Full Name: Chad Killion
Contact:

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

Post by electricd7 »

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?
veremin
Product Manager
Posts: 20413
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

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.
electricd7
Expert
Posts: 122
Liked: 7 times
Joined: Mar 27, 2012 10:13 pm
Full Name: Chad Killion
Contact:

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

Post by electricd7 »

I used the following:

Get-VBRInstantRecovery | where {$_.VMName -eq "vmname"} | Stop-VBRInstantRecovery
veremin
Product Manager
Posts: 20413
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

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.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests