Use PowerShell to Obtain User's Email Attribute

User PowerShell to easily obtain a user's email attribute from Active Directory.

John Savill

July 28, 2014

1 Min Read
PowerShell command prompt

Q: How can I use PowerShell to obtain a user's email attribute?

A: The best PowerShell code for obtaining a user's email attribute is:

Get-ADUser  -Properties mail | Select-Object -ExpandProperty mail

You could also use:

(Get-ADUser  -properties mail).mail

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like