Snapmirror break script
2013-10-25 07:36 AM
Hello all -
We are working on using Snapmirror to facilitate a multi-site windows failover cluster. We are running in to one small issue though - when we invoke the snapmirror break command, it asks us to confirm that we "really" want to do this. This sort of takes the "automatic" part out of it...
Here is the script:
#import netapp module
[string]$sqlInstance = 'SQLCluster'
#connect to the controller managing the volumes for this SQL instance.
Connect-NaController Filer01 #| Out-Null
$mirrors = Get-NaSnapmirror
foreach($mirror in $mirrors)
if($mirror.source -match "Filer02:")
write-host $mirror.Source $mirror.destination
Invoke-NaSnapmirrorBreak $mirror.Destination Y #$mirror.Source --confirm switch?
"Are you sure you want to start SnapMirror break to filer02:volume01?"
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):