Get-ADUser PowerShell - Get AD user details using email address


Posted on : Fri, 2nd Oct 15 02:49 pm GMT

Get-ADUser PowerShell command

Get-ADUser is a PowerShell cmdlet which gets a user or performs a search to retrieve multiple user objects from Active Directory.
Start Windows PowerShell or SharePoint Management Shell (right click - run as administrator) and use this command.

Syntax

Get-ADUser -Filter [-ResultPageSize ] [-ResultSetSize ] [-SearchBase ] [-SearchScope { | | }] [-SearchScope { | | }] [-AuthType { | }] [-Credential ] [-Partition ] [-Properties ] [-Server ] []


Example

Replace the email address with your original email-id before running this command.

Name : Get-ADUser - How to get Active Directory user details based on email address
  
Get-ADUser -Filter {Emailaddress -eq '[email protected]'}
  

You can modify command as below to get only desired property. Below example gets only Display Name, this will return/display only the Name of user.

Get-ADUser -Filter {Emailaddress -eq '[email protected]'} -Properties Name | Select Name

Troubleshooting

If you get an error The term 'Get-ADUser' is not recognized as the name of a cmdlet, run below commands before executing above script.

Import-Module ServerManager
Add-WindowsFeature RSAT-AD-PowerShell

import-module activedirectory


We are operating with limited resources due to COVID-19 - Stay Safe!


We stands in support of racial equality!

Follow us : Facebook - Twitter