image_pdfimage_print

A Pure1 Community forum question asked: “How do you 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 10.21.8.17 -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 10.21.8.17 -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).