I have a script that runs get-ncvol ...the connect... and get-ncvol work fine. I want to get some snapmirror info with
"get-nasnapmirrorschedule" Seems it requires credentialsparameter??!. Does anyone know what the format of get-nassnapmirrorschedule is?
$username = "xxxxx"
$pwdTxt = Get-Content "C:\Scripts\Storage\xxxxx.txt"
$securePwd = $pwdTxt | ConvertTo-SecureString
$credObject = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $securePwd
$global:CurrentNcController = $null
connect-nccontroller $cluster -credential $credObject
get-ncvol
**********************************************
I tried to use "get-nasnapmirrorschedule -Controller xxxx" and it errors...wanting credentials.
get-nasnapmirrorschedule : Incorrect credentials for xxxxx
At C:\scripts\storage\testing-snapmirror\Snapmirror-check.ps1:32 char:1
+ get-nasnapmirrorschedule -Controller xxxxx
+ CategoryInfo : InvalidOperation: (bmina:NaController) [Get-NaSnapmirrorSchedule], NaAuthException
+ FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Snapmirror.GetNaSnapmirrorSchedule