Microsoft Virtualization Discussions
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
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
See The Solution
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.
View solution in original post
thanks for the details. Will check and see if that resolves my issue.
Live Chat, Watch Parties, and More!
Engage digitally throughout the sales process, from product discovery to conﬁguration, and handle all your post-purchase needs.