Angeal
asked on
Powershell: List AD group members but filter users who are disabled
Hi Experts,
I use the following line in Powershell to list AD Group members:
Get-ADGroupMember -identity "Group" | select name,samaccountname
How can I filter out the accounts that are disabled?
Thanks,
A.
I use the following line in Powershell to list AD Group members:
Get-ADGroupMember -identity "Group" | select name,samaccountname
How can I filter out the accounts that are disabled?
Thanks,
A.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Exactly what I was looking for. Thanks Mike!
Glad to help out!
Nice script! What would I need to add in order to include whether the members of the group have a smtp address?
And to add to that, what if I wanted to see all the members of nested groups beneath a particular group?
Open in new window
To export it to a file
Open in new window