PowerShell script exchange
Post Reply
electricd7
Expert
Posts: 117
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 » 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?

veremin
Product Manager
Posts: 17144
Liked: 1485 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 » 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.

electricd7
Expert
Posts: 117
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 » Apr 14, 2015 3:30 pm

I used the following:

Get-VBRInstantRecovery | where {$_.VMName -eq "vmname"} | Stop-VBRInstantRecovery

veremin
Product Manager
Posts: 17144
Liked: 1485 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 » 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests