I am trying to get a list from active directory, where I only see SamAccountName, and all the information from MemberOf tab. The following code lists all the user, but when it comes to MemberOf properties, it will only list 1-2 groups, and then "..."
Get-ADUser -filter * -properties *|
Select SamAccountName,Memberof |
out-file 'Location\UsersExport.txt'
Example output:
SamAccountName OneUser
Memberof {CN=Something,CN=Users,DC=Something,DC=Something, CN=K...
Is there a way to list all the group names only, (I only need SamAccountName and all the MemberOf group rights for all the user) or am I missing some property? Also, is there an option to get rid of all the unnecessary "CN= DC=" fields, and only see the group name?