Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Export a list of Active Directory user accounts to a CSV, grabbing specific properties.
Get-ADUser -Filter 'title -ne 0' -Properties givenName,sn,title,mail,sAMAccountName |select-object givenName,sn,title,mail,sAMAccountName | convertto-csv -Delimiter "`t" -NoTypeInformation | Select-Object -Skip 1 | % { $_ -replace '"', ""} | out-file "EmployeeExport.csv" -fo -en ascii
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.