Retrieving Members of Directory Service Configuration

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.

$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:

Ad-Members

Download the scriptGet-ADMembers.ps1 from https://github.com/PureStorage-OpenConnect/powershell-scripts.

Cheers,
Barkz

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.