- Get link
- X
- Other Apps
We will use the active directory PowerShell shell to fetch the users Group membership, so make sure you import the active directory module before you run the below script.
Below the script code that can be used to fetch the user group membership.
Function GetGroupMembership {
param ($user)
$UserAllProperties = Get-ADUser $user -Properties *
foreach ($Group in $UserAllProperties.memberof) {Get-ADGroup $Group | select Name }
}
- Get link
- X
- Other Apps
Comments
Post a Comment