To connect to a Everpure FlashArray the
New-PfaArray cmdlet is used to create a secure connection from a host (Eg. Windows Server 2019 or Windows 10) to the specified FlashArray. A connection to the FlashArray is done over HTTPS using TLS 1.1/1.2.
The PowerShell SDK provides detailed help for each of the cmdlets. Use the
Get-Help <cmdlet name> to retrieve the details. Refer to How-To: Access and Update Help for the PowerShell SDK for more information on accessing and using help.
For example, try the command below in a Windows PowerShell session.
PS C:\> Get-Help New-PfaArray -Examples
NAME
New-PfaArray
SYNOPSIS
Logs onto the specified FlashArray.
-------------------------- EXAMPLE 1 --------------------------
PS C:\>$Array = New-PfaArray -EndPoint pure01.example.com -UserName pureuser -HttpTimeOutInMilliSeconds 300000 -Version 1.3
Using Version 1.3 of the REST API, connects to the FlashArray named "pure01.example.com" with pureuser's login
credentials. The cmdlet prompts for the login password and masks the password string on the screen.
The request times out if it takes longer than 300,000 milliseconds.
"$Array" can be used with the "-Array" parameter in subsequent cmdlets (for example, "Disconnect-PfaArray -Array
$Array").
-------------------------- EXAMPLE 2 --------------------------
PS C:\>$myCredential = Get-Credential
$myArray = New-PfaArray -EndPoint pure01.example.com -Credentials $myCredential -IgnoreCertificateError
Connects to the FlashArray named "pure01.example.com", ignoring any certificate errors.
First, the PowerShell command Get-Credential opens a pop-up to enter the login credentials, which are saved to
$myCredential.
-------------------------- EXAMPLE 3 --------------------------
PS C:\>$SecurePassword = ConvertTo-SecureString -String $ArrayPassword -AsPlaintext -Force
$Array = New-PfaArray -EndPoint pure01.example.com -username pureuser -Password $SecurePassword -IgnoreCertificateError
Connects to the FlashArray named "pure01.example.com", ignoring any certificate errors.
First, the PowerShell command ConvertTo-SecureString is used to convert a plain password to a secure string, which is
saved to $SecurePassword.
-------------------------- EXAMPLE 4 --------------------------
PS C:\>$Array = New-PfaArray -EndPoint pure01.example.com -UserName pureuser -RoleRequired ArrayAdmin
Connects to the FlashArray named "pure01.example.com" with pureuser's login credentials. The cmdlet prompts for the
login password and masks the password string on the screen.
The request times out if it takes longer than 300,000 milliseconds.
The request fails if the specified user does not have at least ArrayAdmin permission.
-------------------------- EXAMPLE 5 --------------------------
PS C:\>$Array = New-PfaArray -EndPoint pure01.example.com -ApiToken 99ce4e5a-3593-f724-4c44-e1a8c19c0c49 -IgnoreCertificateError
Connects to the FlashArray named "pure01.example.com", ignoring any certificate errors and using an API token for authentication