Skip to content

Instantly share code, notes, and snippets.

@seanosullivanuk
Created August 11, 2020 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanosullivanuk/145e0a51599ee80ebe3e243d49292259 to your computer and use it in GitHub Desktop.
Save seanosullivanuk/145e0a51599ee80ebe3e243d49292259 to your computer and use it in GitHub Desktop.
Export all Computer records from Active Directory to a CSV
Import-Module ActiveDirectory
Get-ADComputer -Filter * -Properties * |
Select -Property Name,DNSHostName,Enabled,Description |
Export-CSV "C:\Temp\AllComputers.csv" -NoTypeInformation -Encoding UTF8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment