There are multiple ways to do authentication to NetApp systems when using the PowerShell Toolkit. This ranges from the simple and obvious one-time connection, to securely storing credentials for future use. Saving credentials can be useful when executing scripts from a host non-interactively, such as with scheduled tasks or triggered through another script.
Connecting to a Single Controller
Connect-NcController is the standard method of connecting to a clustered Data ONTAP controller.
Connect-NaController is the 7-mode equivalent and works identically. Additionally, the same credential rules apply for the
Invoke-NaSsh cmdlets as well.
Arguably the most common method of connecting to a controller is by simply providing the hostname:
# this will attempt to connect to the specified controller using stored credentials, or if none
# are found, will prompt for credentials. it will also default to HTTPS, with a fallback to HTTP
If you are connecting to an SVM’s management interface this will work as expected, though some cmdlets won’t work because of the limited scope. If you want to connect to an SVM by tunneling through the cluster management interface, use the
Connect-NcController $clusterMgmtLif -Vserver $SvmName
However, there are a number of parameters which change the default behavior.
Read moreNetApp PowerShell Toolkit: Authentication