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 'user@code2care.com'}


✔️ 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 'user@code2care.com'} -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!





Hello there!,

You are using AdBlocker!

I am an independent developer trying to help fellow developers and students to resolve issues faced on a day-to-day basis, we 'Code to Care' . There is a lot of expenses involved in hosting and managing a website that's the reason we have ads.

A humble request to you to disable adBlocker on Code2care.org and support us pay our bills.

Thanks,
Cod2care - Line's of code for change.

To see contents reload page after unblocking
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, Tips-n-tricks, How Tos, Blogs, Articles, etc. on various platforms like Windows, Mac, Linux, Mobile platforms, etc. Technologies/Languages like Java, Objective-C, PHP, .Net, Android, SharePoint, jQuery, HTML, CSS, etc.