Microsoft Virtualization Discussions

encrypting password for accessing the array

DJRIVERA01

Hi,

Is there a way to do this so we don't have to leave plain text password around?

1 REPLY 1

billyd

Yes, try this. 

read-host -assecurestring | convertfrom-securestring | out-file C:\securestring.txt`

Once you have the encrypted password file created, you can add the following to your script or run direct from the CLI:

$username = "domain01\user"
$password = cat C:\securestring.txt | convertto-securestring
$cred = new-object -typename System.Management.Automation.PSCredential `
         -argumentlist $username, $password

Then, connect-nacontroller controller01 -Credential $cred

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