The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

Incorrect credentials after making connection multiple controllers

Daniel_Maryuma

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

1 ACCEPTED SOLUTION

ttran

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

View solution in original post

2 REPLIES 2

ttran

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

View solution in original post

donny_lang

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.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public