Microsoft Virtualization Discussions

Problem in connecting to 7m & CDot storage systems

ARB
3,825 Views

Hello All,

 

I am trying to fetch details across 7M & Cdot storage systems. I use  domain credentials to  login to the storage systems. While doing so following issues are being encountered.

 

i) Everytime I start the script I need to provide the credentials to get into the storage systems for fetching the details. which I want to avoid and it should do it automatically

 

ii) Tried defining user and pword variables and creating a new object. Which works but I dont want to keep the user/password in the script as lot of users use the same system

    $cred = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $user,$pword [ $user/ $pword  are defined]

 

iii) Most importantly while connecting to the storage systems I am getting the following error frequently. Details mentioned below.

 

      Note: I use the -credential for authentication . We need to rely on using domain authentication only for authenticating to the filer

$nccontroller = Connect-NcController $controller -Credential $cred 

 

 

ERROR:

=======

 

Connect-NcController : Incorrect credentials for <controller_name>
At line:1 char:1
+ Connect-NcController <controler_name>
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidResult: (controller_name:NcController) [Connect-NcController], NaAuthException
    + FullyQualifiedErrorId : HttpConnectionFailed,DataONTAP.C.PowerShell.SDK.ConnectNcControll

 

Please suggest on the queries

 

1 ACCEPTED SOLUTION

asulliva
3,792 Views

Hello @ARB,

 

I wrote about authentication with the PSTK here, it might have some useful tips for you.

 

The easiest way is to use the "Add-NaCredential" and "Add-NcCredential" cmdlets to securely store the credentials on the system you're executing the script from.

 

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

3 REPLIES 3

asulliva
3,793 Views

Hello @ARB,

 

I wrote about authentication with the PSTK here, it might have some useful tips for you.

 

The easiest way is to use the "Add-NaCredential" and "Add-NcCredential" cmdlets to securely store the credentials on the system you're executing the script from.

 

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

ARB
3,783 Views

Hello Asulliva,

 

thanks for the details. Will check and see if that resolves my issue.

ARB
3,740 Views
Hello Asulliva, It has worked. Thanks for the details.
Public