The Toolkit provides cmdlets for storing credentials. Check out the following cmdlets:
PS C:\> help *NaCredential
Name Category Synopsis
---- -------- --------
Add-NaCredential Cmdlet Save login credentials for a Data ONTAP controller.
Get-NaCredential Cmdlet List entries in the credentials cache.
Remove-NaCredential Cmdlet Remove saved login credentials for a Data ONTAP controller.
Connect-NaController and Connect-NcController will automatically use the credentials cache. For example, we can add the credentials for 10.61.169.28, then use Connect-NaController to connect without having to provide credentials:
PS C:\> Get-NaCredential 10.61.169.28
PS C:\> Add-NaCredential 10.61.169.28 -Credential root
Name Credential HostUser
---- ---------- --------
10.61.169.28 System.Management.Automation.PSCrede...
PS C:\> Connect-NaController 10.61.169.28
Name Address Ontapi Version
---- ------- ------ -------
10.61.169.28 10.61.169.28 1.13 NetApp Release 8.0.1 7-Mode: Wed Jan 5 17:24:41 PST 2011
-Steven