PowerShell script exchange
rickyelqasem
Novice
Posts: 6 Liked: never
Joined: Jan 01, 2006 1:01 am
Contact:
Post
by rickyelqasem » Sep 05, 2011 6:17 pm
this post
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
Veteran
Posts: 259 Liked: 8 times
Joined: Sep 18, 2009 9:56 am
Full Name: Andrew
Location: Adelaide, Australia
Contact:
Post
by Bunce » Sep 05, 2011 11:49 pm
this post
"-ResotePoint" Typo?
Sethbartlett
Veteran
Posts: 282 Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:
Post
by Sethbartlett » Sep 06, 2011 1:00 am
this post
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
Chief Product Officer
Posts: 31707 Liked: 7212 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:
Post
by Gostev » Sep 06, 2011 9:24 pm
this post
Ah, this is embarrassing... gotta make sure this gets fixed!
Users browsing this forum: No registered users and 1 guest