I need to extract the name and mobile of all users in an AD group that consists of more than 5000 members.
When I previously did this I only had to extract the name, and this code solved my problem
Get-ADGroup 'xxx' -Properties Member | Select-Object -ExpandProperty Member | Sort Get-ADGroup "xxx" -Properties Member | Select-Object -ExpandProperty Member | Get-ADObject | Select Name | Sort Name ((Get-ADGroup "xxx" -Properties member).member).count Get-ADGroup "xxx" -Properties Member | Select-Object -ExpandProperty Member | Get-ADObject | Select Name | Sort Name | Export-Csv C:\temp\exportmembers.csv -Encoding UTF8 -NoTypeInformation Since groups don't contain the property "mobile" I'm unsure how to go about this.
Any help is appreciated.