Hi @Roger Roger
Something like this:
If you have a big AD, that might take a while though.
Import-Module ActiveDirectory
Get-ADUser -Filter * -Properties * | export-csv c:\ADusers.csv
Export users from Active Directory using PowerShell
There is another, much quicker way to accomplish the title task. You can export users from Active Directory using PowerShell. The cmdlet below exports a complete list of my company’s users to a csv file.
Get-ADUser -Filter 'Company -like "Alpha*"' -Properties * | Select -Property EmailAddress,GivenName,Surname,DisplayName,Title,Department,Office,OfficePhone,MobilePhone,Fax,StreetAddress,City,State,PostalCode,Country | Export-CSV "C:\\ADusers.csv" -NoTypeInformation -Encoding UTF8
Powershell Script to export Active Directory users to CSV
Please don’t forget to Accept the answer
and up-vote
wherever the information provided helps you, this can be beneficial to other community members.