How to Export Active Directory Objects to CSV

 

  1. 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

  1. Open the file produced by the script in MS Excel.
Excel report - How to Export Active Directory Objects to CSV

Comments

Popular posts from this blog

Changes in Windows 2008 Active Directory

How to Write a Letter Requesting Sponsorship

Windows Server Support Interview Questions and Answers (L1)