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

Get-ADUser PowerShell command can be used to get a user or multiple user objects from Active Directory.

Start Windows PowerShell or SharePoint Management Shell (right click - run as administrator) and execute the command.

✔️ Syntax of Get-ADUser PowerShell command

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

✔️ Get-ADUser PowerShell command to get user profile

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

Get-ADUser -Filter {Emailaddress -eq ''}

✔️ Get selective user properties using Get-ADUser

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

Get-ADUser -Filter {Emailaddress -eq ''} -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 the above script.
Get-ADUser PowerShell command
Get-ADUser PowerShell command
Import-Module ServerManager

Add-WindowsFeature RSAT-AD-PowerShell

import-module activedirectory

Have Questions? Post them here!

Recent Posts:

Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.