Hello All i am working on a simple script that will export the contents of an AD group with a couple properties so the groups users can be imported into a new domain i just stood up. Here is the code i have so far:
Example:
Get-ADGroupMember -Identity Administrators | Select-Object Name,SamAccountName,Surname | Export-Csv GroupMembers.csv
In my output i get:
| #TYPE Selected.Microsoft.ActiveDirectory.Management.ADPrincipal | ||
| Name | SamAccountName | Surname |
| Domain Admins | Domain Admins | Microsoft.ActiveDirectory.Management.ADPropertyValueCollection |
| Enterprise Admins | Enterprise Admins | Microsoft.ActiveDirectory.Management.ADPropertyValueCollection |
| Administrator | Administrator | Microsoft.ActiveDirectory.Management.ADPropertyValueCollection |
I am not quite sure how i export the multi-valued attribute. Any help would be appreciated.