Skip to main content

Resume-HyperV-Replication Powershell Script

import-module Hyper-V 

Get-VMReplication | Where-Object {$_.state -eq "Suspended"} | Resume-VMReplication 

Start-Sleep -s 120 

Get-VMReplication | Where-Object {$_.state -eq "Error"} | Resume-VMReplication 

Start-Sleep -s 120 

$FailedServers = Get-VMReplication | Where-Object {$_.state -eq "Error" -or $_.state -eq "Suspended"} | Select -ExpandProperty "Name" 

write-host $FailedServers 

 

 

 

 

 

 

To get current status: 

Get-VMReplication