Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Export group membership of user to csv file

$
0
0

Hi,

 

When I run the follwoing command to display group membership of a user I can see the groups.

get-aduser -filter { CN -eq "username" } -searchbase 'ou=users,dc=domain,dc=com' -properties memberof | select sam
accountname,memberof

 

But when I run the same command with | export-csv "c:\users.csv" no group memberships are displayed. Could somebody please explain why this is?

 

Thanks


Viewing all articles
Browse latest Browse all 6937

Trending Articles