How-To: Enabling/Disabling Remote Assist with the PowerShell SDK

A question that is coming up often as more and more customers leverage the Pure Storage PowerShell SDK for automation management is, “How do I control Remote Assist sessions using the PowerShell SDK?” 

PS C:\> Get-Command -Module PureStoragePowerShellSDK -Noun *Remote*


CommandType     Name                                               Version    Source                  
———–     —-                                               ——-    ——                  
Cmdlet          Get-PfaRemoteAssistSession                         1.0.15.0   PureStoragePowerShellSDK
Cmdlet          Set-PfaRemoteAssistStatus                          1.0.15.0   PureStoragePowerShellSDK

PS C:\> $Creds = Get-Credential
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:

PS C:\> $FlashArray = New-PfaArray -EndPoint ******* -Credentials $Creds -IgnoreCertificateError

PS C:\> $FlashArray

Disposed   : False
EndPoint   : *******
UserName   : pureuser
ApiVersion : 1.4
Role       : ArrayAdmin
 
PS C:\> Get-PfaRemoteAssistSession -Array $FlashArray

status   port
——   —-
disabled     
 
 
What this shows is that the Remote Assist port can be enabled or disabled for Remote Assist. Controlling the actual connectivity is not currently possible via the REST API or the PowerShell SDK, this is only available using the Command Line Interface (CLI). This is a limitation today within the REST API which is what the PowerShell SDK leverages to interact with the Pure Storage FlashArray. There are no current plans to provide this feature but I never say never 😉 
 
–Barkz