NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform.
You will still be able to view content, but posting and replying will be temporarily disabled.
To learn more, please review the information in this blog post.

ONTAP Discussions

gMSA account

ToddBarton
2,471 Views

Is it possible to login to a NetApp cluster (9.13) using a global Managed Service Account to run a powershell script?

3 REPLIES 3

AlexDawson
2,333 Views

If the system is configured for domain authentication and the account is part of a group that is authorised for the ONTAPI login method, it should work.

ToddBarton
2,265 Views

The system is configured for domain authentication and the account is part of a group authorized for ONTAPI login. I can't figure out how to run the Get- and Add-Credential to include both the Userid (gMSA account) and the password in my script to allow the connection to the NetApp cluster.

Sanaman
2,242 Views

You can use stored credentials for auto login, similar to

 

$credential = Get-Credential
$credential.password |ConvertFrom-SecureString |set-Content C:\Users\domain_user\encrypted_password.txt

 

$encrypted = Get-Content C:\Users\domain_user\encrypted_password.txt | ConvertTo-SecureString
$dom_user = "domain\domain_user"


$credential = New-Object System.Management.Automation.PsCredential($dom_user, $encrypted)

 

Then use that credential ($credential) to login to the cluster ($filer)

 

$ClusterConnection = Connect-NcController -name $filer -Credential $credential
# If the connection is not success, exit else continue.


if (!$ClusterConnection) {
Write-Host "Unable to connect to $filer, please ensure all supplied information is correct and try again"
Exit

} else

{ Continue with you script}

 

Hope that helps

Public