Export Some ADUsers for Specific OU with sAMaccountName & memberof

what is the best scenario for the command to use it 

  • Get-ADuser -Filter *  -searchbase "OU=Users,OU=Test,OU=Stores,OU=OLD,DC=LAND,DC=Egypt,DC=local" -Properties * | Select-Object sAMAccountName, displayName, memberof
  • Get-ADGroup | Select-Object name,GroupCategory,GroupScope | Sort-Object name |export-csv -path c:\temp\Export_Group_Test.csv


cmdlet Get-ADGroup at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)

  1. when using (Get-ADuser -Filter *  -searchbase "OU=Users,OU=Test,OU=Stores,OU=OLD,DC=LAND,DC=Egypt,DC=local" -Properties * | Select-Object sAMAccountName, displayName, memberof).memberof | Export-csv -path c:\temp\Export_Group_Test.csVgetting csv with strange number only 
  2. Get-ADuser -Filter *  -searchbase "OU=Users,OU=Test,OU=Stores,OU=OLD,DC=LAND,DC=Egypt,DC=local" -Properties *|Select-Object sAMAccountName, displayName, memberof Without exporting i sow what i need the group name but when adding | Export-csv -path c:\temp\Export_Group_Test.csV the excel column shown with Microsoft.ActiveDirectory.Management.ADPropertyValueCollection