What Volume is Connected to What Host?

There was a Pure1 Community forum question asking how to identify what volume is connected to what host?

Here are some simple scripts to display with no need to go to the Pure Storage FlashArray web management GUI.

Hosts to Volumes

$FA New-PfaArray -EndPoint -Credentials(Get-Credential) -IgnoreCertificateError
$PureHosts Get-PfaHosts -Array $FA
ForEach ($PureHost in $PureHosts) {
  Get-PfaHostVolumeConnections -Array $FA -Name $PureHost.Name

Host Groups to Volumes

$FA New-PfaArray -EndPoint -Credentials(Get-Credential) -IgnoreCertificateError
$PureHostGroups Get-PfaHostGroups -Array $FA
ForEach ($PureHostGroup in $PureHostGroups) {
  Get-PfaHostGroupVolumeConnections -Array $FA -HostGroupName $PureHostGroup.Name

Download Get-PfaConnections.ps1 script from GitHub (barkz/PurePowerShellGuy).


    • Glad you found the script useful. Items in the “recycle bin” are referred to as Pending Deletes. There are two ways of achieve what you are asking:
      (1) There is a parameter on the Get-PfaVolumes cmdlet -IncludePendingDeletes
      (2) Use cmdlet Get-PfaPendingDeleteVolumes

      Use Get-Help -examples to see how to use them.


  1. Barkz,

    hope all is well! do you have updated commands for powershell sdk v2? seems like some of these commands cannot convert string name.

  2. The SDK 2 does not seem to include a corresponding command for Get-PfaHostVolumeConnections. How can the connected volumes be pulled with SDK 2?

Add Comment

Required fields are marked *. Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.