List all Users, Email and Phone Number from Active Directory

In this post, will use Active Directory PowerShell or EMC to get a list of all users, emails and their mobile phone numbers.

By using Get-ADUser Cmdlet

Get-ADUser -f * -Properties *| where {$_.enabled -eq $true} | ft Name,EmailAddress,*Phone

If you want to export

get-aduser -properties * -filter * | select name, emailaddress, officephone,homephone,mobilephone,ipphone,fax | export-csv c:\scripts\users.csv

Get-ADUser can retrieves a number of attributes by default, if you don’t need those, use Select-Object to retrieves the ones you only need:

Get-ADUser -Filter * -Properties mobile | Select-Object Name,Mobile

For EMC, you can run this command in PowerShell:

Get-User username | fl FirstName,LastName,SamAccount,Phone,MobilePhone

Or for everyone in the organization:

Get-User | fl FirstName,LastName,SamAccount,Phone,MobilePhone

Hope you find this useful.

Leave a Comment

sixteen − nine =