How to Export Active Directory Objects to CSV
Open the Powershell ISE → Create new script with the following code and run it. Get-ADObject -Filter 'Name -like "*"' | Where-Object {$_.ObjectClass -eq "user" -or $_.ObjectClass -eq "computer" -or $_.ObjectClass -eq "group" -or $_.ObjectClass -eq "organizationalUnit"} | Sort-Object ObjectClass | Export-CSV C:\Temp\ExportAD.csv -notypeinformation Open the file produced by the script in MS Excel.