hello!
i am new to powershell and am trying to write a scritp to snapmirror more than 50 volumes using snapmirror, source and destination volumes have been created .Destinations volumes have been restricted.
With some online help i have this scrit to snapmirror volumes but it fails can someone point out the right way to get this done.
Thx
$csv = Import-Csv C:\volume1.csv
$filer1 = "10.168.55.13"
$filer2 = "10.168.55.14"
foreach ($line in $csv) {
Invoke-NaSnapmirrorInitialize -Source $filer1:$line.source -Destination $filer2:$line.dest
}
My csv file looks like this
i get the following error
Invoke-NaSnapmirrorInitialize : Invalid destination @{source=vol1; dest=vol1}.dest: invalid character found in the vol
At C:\Users\xyz\snapmirrortest.ps1:5 char:34
+ Invoke-NaSnapmirrorInitialize <<<< -Source $filer1:$line.source -Destination $filer2:$line.dest
+ CategoryInfo : InvalidOperation: (10.168.55.14:NaController) [Invoke-NaSnapmirrorInitialize], ESNAPMIRR
+ FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Snapmirror.InvokeNaSnapmirrorInitialize
Invoke-NaSnapmirrorInitialize : Invalid destination @{source=vol2; dest=vol2}.dest: invalid character found in the vol
At C:\Users\xyz\snapmirrortest.ps1:5 char:34
+ Invoke-NaSnapmirrorInitialize <<<< -Source $filer1:$line.source -Destination $filer2:$line.dest
+ CategoryInfo : InvalidOperation: (10.168.55.14:NaController) [Invoke-NaSnapmirrorInitialize], ESNAPMIRR
+ FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Snapmirror.InvokeNaSnapmirrorInitialize