force remove hyperv to azure replication
Alex Kleeorin
61
Reputation points
I am trying to remove a specific an old, failed replication from HYPERV to azure of a specific VM using this script
$vmName = "VMName"
$vm = Get-WmiObject -Namespace "root\virtualization\v2" -Query "Select * From Msvm_ComputerSystem Where ElementName = '$vmName'"
$replicationService = Get-WmiObject -Namespace "root\virtualization\v2" -Query "Select * From Msvm_ReplicationService"
$replicationService.RemoveReplicationRelationship($vm.__PATH)
however i get this error
Exception calling "RemoveReplicationRelationship" : "Invalid method Parameter(s)
any help will be gladly appreciated
Sign in to answer