The New-PfaCliCommand is a cmdlet we introduced for situations that the REST API is updated in a new version of Purity but the new REST endpoints are not supported in the PowerShell SDK just yet.
New-PfaCLICommand -EndPoint 10.21.201.57 -Credentials $Creds `
-CommandText "purevol list"
When using this cmdlet be sure that your firewall rules allow for Port 22 traffic. Otherwise the cmdlet will fail and the following error will be returned.
New-PfaCLICommand : A connection attempt failed because the connected party did not properly respond after a period of
time, or established connection failed because connected host has failed to respond
At line:3 charrl
+ New-PfaCLICommand -EndPoint Sarray -Credentials $cred -CommandText "? ...
+ Categorylnfo : NotSpecified: (:) [New-PfaCLICommand], SocketException
-I- FullyQualifiedErrorld : System. Net. Sockets. SocketException, PurePowerShel 1. NewCLICommand
Side note, you’ll see in the error message the CommandText is a “?”. If you use that it will show the results of purehelp.
This post was originally published on the blog of Barkz.