PowerShell script exchange
Post Reply
rickyelqasem
Novice
Posts: 6
Liked: never
Joined: Jan 01, 2006 1:01 am
Contact:

Instant VM Recovery from PowerShell

Post by rickyelqasem »

I thought I'd share this with you this script to first start an Instant VM recovery then stop one:

Starting

Code: Select all

$rp = Get-VBRBackup | where {$_.JobName -eq "WebServer"} | Get-VBRRestorePoint
$server = Get-VBRServer | where {$_.Name -eq "192.168.5.80"}
$res = Find-VBRResourcePool -Server ($server) | where {$_.Name -eq "Resources"}

Start-VBRInstantRecovery -ResotePoint $rp -VMName web-srv2a -Server $server -ResourcePool $res -PowerUp $true -NICsEnabled $true
Stopping

Code: Select all

$IR = Get-VBRInstantRecovery | where {$_.VMName -eq "web-srv2a"}
Stop-VBRInstantRecovery $IR

Bunce
Expert
Posts: 259
Liked: 8 times
Joined: Sep 18, 2009 9:56 am
Full Name: Andrew
Location: Adelaide, Australia
Contact:

Re: Instant VM Recovery from PowerShell

Post by Bunce »

"-ResotePoint" Typo?

Sethbartlett
Expert
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: Instant VM Recovery from PowerShell

Post by Sethbartlett »

It's a typo in the source code, not in the script Rickey wrote:)
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.

Gostev
SVP, Product Management
Posts: 26679
Liked: 4268 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Instant VM Recovery from PowerShell

Post by Gostev »

Ah, this is embarrassing... gotta make sure this gets fixed!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests