I have a powershell command:
Get-ADGroupMember -identity "CCVGHCFinReadOnly" -Recursive | foreach{ get-aduser -properties employeeid $_} | select SamAccountName,objectclass,name,employeeid | Export-Csv "C:\Temp\AD Membership\GovReadOnly.csv
This script works great to return members of AD groups. I also want to add the count for auditing purposes. So the script should list all ad users and then a count at the bottom.
Right now if I use | Measure it gives me a count but that is all I get. So I can either get the actual users in the AD group OR the count. How can I get both with this one command?