Go to ...

Techpository

A Better Technical Repository

RSS Feed

Windows Server

Powershell: Pull all user’s displaynames, emailaddress, samaccountname

Install needed powershell modules: import-module servermanager Add-WindowsFeature -Name “RSAT-AD-PowerShell” -IncludeAllSubFeature import-module activedirectory Run the following command: Get-ADUser -Filter * -Properties DisplayName, EmailAddress, SamAccountName | select DisplayName, EmailAddress, SamAccountName | Export-CSV “C:\Email_Addresses.csv” By: Timothy Jay Conrad

Older Posts››