Hello Everyone,
When i use Get-ADPrincipalGroupMembership $username | select name in my powershell code I Get all the groups that the user belongs to, but now when i assign the same as below it doesn't output the results and just goes blank.
I would like it give the results and if possible i would like it do only show distribution groups only.
$DisplayGroups = Get-ADPrincipalGroupMembership $username | select name
write-host -foregroundcolor Yellow "$DisplayGroups"
shows blank
Am running it on Server 2008 R2 - powershell 2
Kindly assist in formating to get the desired output.
Meshack