Start-VBRReplicaFailover with PowerShell

PowerShell script exchange

Start-VBRReplicaFailover with PowerShell

Veeam Logoby clacombe@epsilia.com » Fri May 06, 2011 6:57 pm

A client asked me to create a script to start a failover of a particular replicated VM using an icon
By surfing a little bit on the net I found a good start but I still not found how to do it.
Here are the actual script I working on!

I need to stop the original VM named xxx and then failover to the latest copy of the VM xxx to the second VMWARE Server
I appreciate any help to complete this request!

=====================
if((Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue) -eq $null){
Add-PSSnapin "VeeamPSSnapIn"
}

$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes",""
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No",""
$choices = [System.Management.Automation.Host.ChoiceDescription[]]($yes,$no)
$caption = "Attention!"
$message = "Do you really want to start the failover VM for machine xxx ?"
$result = $Host.UI.PromptForChoice($caption,$message,$choices,0)
if($result -eq 0)
{
Write-Host "Starting the failover of the machine xxx"
(here is the place that I will add the command to do the failover
}
if($result -eq 1) { Write-Host "You didn't acknoledge to failover!" }
start-sleep 10
clacombe@epsilia.com
Lurker
 
Posts: 2
Liked: never
Joined: Fri May 06, 2011 6:44 pm
Full Name: Claude Lacombe

Re: Start-VBRReplicaFailover with PowerShell

Veeam Logoby Gostev » Fri May 06, 2011 7:17 pm

Hi Claude,

You look to be our ProPartner.

Please go to the ProPartner portal, click Learning Center, click Technical papers and look for "Smart Recovery Orchestration" paper by Arseny Chernov. It seems to be leveraging similar script as a part of the process.

Hope this helps.
Gostev
Veeam Software
 
Posts: 21396
Liked: 2350 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 7 guests