Forum Discussion

Scott_Stockton's avatar
4 years ago

$myCredential = Get-Credential $user = Read-Host "Enter

$myCredential = Get-Credential $user = Read-Host "Enter Username" $pass = Read-Host "Enter Password" -AsSecureString <# Create Local User to use instead of pureuser #> Import-Module PureStoragePowerShellSDK $Array = @( 'test' ) foreach ($Endpoint in $Array) { New-PfaArray -EndPoint $Endpoint -Credentials $myCredential -IgnoreCertificateError | New-PfaLocalUser -User $user -Password $pass -Role array_admin }
  • Hi Scott , I did that with API V2. $global:authentification = Get-Credential $baie_purestoa1 = Connect-Pfa2Array -EndPoint array_name -Credential $authentification and after, you can use by example : Get-Pfa2Volume -Array $baie_purestoa1
  • Hi Scott - currently, the FlashArray API only allows for a plain text string for the password field. I am working with the API folks to understand why that is, but also see if we can possibly get it changed in the future. I also put in an RFE for the SDK to see if our crafty developers could come up with a way to do it outside of the API. Doubtful, but I still asked.
  • Everything that is passed between the SDK (except for the CLI cmdlet) is encrypted inside the TLS transport, so effectively, the password is not transmitted in plain text.
  • Thanks, we are still updating off of some 5.x code so I don't know if API V2 will work on them all but great to know for future use.