Once Pure Storage® FlashArray Directory Services has been configured, seeing who has been added to the different defined groups (Array_Admin_Group, ReadOnly_Group or Storage_Admin_Group) can be a challenge using the Web management GUI. Combining the use of the Pure Storage PowerShell SDK and Active Directory PowerShell cmdlets, this can be easily gathered and then run for compliance reporting as needed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
$FlashArray = New-PfaArray -EndPoint 0.0.0.0 -Credentials (Get-Credential) -IgnoreCertificateError Write-Host “==================================================” Write-Host “Pure Storage Directory Services Configuration” Write-Host “==================================================” Get-PfaDirectoryServiceConfiguration $FlashArray $Groups = Get-PfaDirectoryServiceGroups -Array $FlashArray Write-Host “==================================================” Write-Host ” Array Admins Group: $($Groups.array_admin_group)” Write-Host “==================================================” Get-ADGroup $Groups.array_admin_group Get-ADGroupMember $Groups.array_admin_group Write-Host “==================================================” Write-Host ” Read Only User Group: $($Groups.readonly_group)” Write-Host “==================================================” Get-ADGroup $Groups.readonly_group Get-ADGroupMember $Groups.readonly_group Write-Host “==================================================” Write-Host ” Storage Admin Group: $($Groups.storage_admin_group)” Write-Host “==================================================” Get-ADGroup $Groups.storage_admin_group Get-ADGroupMember $Groups.storage_admin_group |
Example output:
Download the scriptGet-ADMembers.ps1 from https://github.com/PureStorage-OpenConnect/powershell-scripts.