Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Incorrect credentials after making connection multiple controllers
2021-04-21
06:41 AM
2,882 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
Just trying to use Get-NcSnapmirror on multiple controllers. i tried
$nc1 = connect-NcController -name xxx ...
$nc2 = connect-NcController -name yyy ...
When i try "Get-NcSnapmirror -Controller $nc2" i get incorrect credentials. and without -Controllers it works but i must use it because i script resync svm-dr so i need to connect to both controllers in the same script.
Thanks
Solved! See The Solution
1 ACCEPTED SOLUTION
Daniel_Maryuma has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Daniel_Maryuma,
I was able to replicate the issue, which indeed is due to the stored credentials only being active in memory for a single controller at a time. The solution for this would be to set a credential variable for each controller and specify the credential variable in the connect variable.
See the example below that I tested in our lab system using PSTK 9.8:
PS LAB> $creds_nc1 = Get-Credential -message 'Please provide password for nc1'
PS LAB> $creds_nc2 = Get-Credential -message 'Please provide password for nc2'
PS LAB> $nc1 = Connect-NcController lab-cluster1 -Credential $creds_nc1
PS LAB> $nc2 = Connect-NcController lab-cluster2 -Credential $creds_nc2
PS LAB> get-ncsnapmirror -controller $nc1
SourceLocation DestinationLocation Status MirrorState
-------------- ------------------- ------ -----------
lab-cluster1://labsvm1/labsvm1_vol1_src lab-cluster2://labsvm1/labsvm1_vol1_dest idle snapmirrored
PS LAB> get-ncsnapmirror -controller $nc2
SourceLocation DestinationLocation Status MirrorState
-------------- ------------------- ------ -----------
lab-cluster2://labsvm1/labsvm1_vol1_src lab-cluster1://labsvm1/labsvm1_vol1_dest idle snapmirrored
PS LAB>
Regards,
Team Netapp
Team NetApp
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What version of PowerShell and the PSTK are you using? I'm not able to replicate the issue on the couple of different machines I tried it on, running PSTK 9.8.0 and PowerShell 5.1.
Daniel_Maryuma has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Daniel_Maryuma,
I was able to replicate the issue, which indeed is due to the stored credentials only being active in memory for a single controller at a time. The solution for this would be to set a credential variable for each controller and specify the credential variable in the connect variable.
See the example below that I tested in our lab system using PSTK 9.8:
PS LAB> $creds_nc1 = Get-Credential -message 'Please provide password for nc1'
PS LAB> $creds_nc2 = Get-Credential -message 'Please provide password for nc2'
PS LAB> $nc1 = Connect-NcController lab-cluster1 -Credential $creds_nc1
PS LAB> $nc2 = Connect-NcController lab-cluster2 -Credential $creds_nc2
PS LAB> get-ncsnapmirror -controller $nc1
SourceLocation DestinationLocation Status MirrorState
-------------- ------------------- ------ -----------
lab-cluster1://labsvm1/labsvm1_vol1_src lab-cluster2://labsvm1/labsvm1_vol1_dest idle snapmirrored
PS LAB> get-ncsnapmirror -controller $nc2
SourceLocation DestinationLocation Status MirrorState
-------------- ------------------- ------ -----------
lab-cluster2://labsvm1/labsvm1_vol1_src lab-cluster1://labsvm1/labsvm1_vol1_dest idle snapmirrored
PS LAB>
Regards,
Team Netapp
Team NetApp
