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
Import-Module ServerManager
Add-WindowsFeature RSAT-AD-PowerShell
import-module activedirectory
Have Questions? Post them here!
More Posts related to SharePoint,
- error CAML Query containing special characters
- [Solved] SharePoint Illegal operation attempted on a registry key that has been marked for deletion
- Trigger Flow on selected Listitem from SharePoint view - create button with JSON column formatting
- SharePoint Excel error - The workbook cannot be opened because it contains the following features that are not supported by Excel in the browser
- Send Email with attachment using SharePoint PowerShell, SMTP server
- How to show or hide columns in SharePoint Online List Library from
- SharePoint excel error - A problem occurred while connecting to the server. If the problem continues, contact your administrator.
- How to get SharePoint Online user details from person or group column using REST API
- How to get SharePoint List Item URL using PowerShell
- How to get the SharePoint Tenant Login URL
- Special character & not working with SharePoint REST API
- How to disable SharePoint subsite creation option for owners
- Managed Metadata error - The data returned from the tagging UI was not formatted correctly
- Deploy SharePoint wsp solution package using PowerShell
- How to create classic site in SharePoint Online
- See actual SharePoint error exception modify web.config
- 'Edit Document' Requires a Windows Sharepoint Services-compatible application and Microsoft Internet Explorer 6.0 or higher
- How to enable anonymous public access for SharePoint Online site collection, file, folder without login ?
- SharePoint installation error - Setup is unable to proceed due to the following error This product requires Microsoft .Net Framework 4.5
- How to add animated Gif to SharePoint Online Page
- [Solved] SharePoint Search Internal server error exception
- How to create SharePoint Document Library
- SharePoint - Use Today's Date Time in list view filter and calculated column
- How to redirect SharePoint Site Collection to different URL
- SharePoint error cannot connect to the configuration database
More Posts:
- How to comment out a block of code in Python - Python
- Upload a File in Microsoft SharePoint using PowerShell Script - SharePoint
- How to remove JetBrains Toolbox from Mac Startup - HowTos
- Using Document Map in Notepad++ - NotepadPlusPlus
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python] - Python
- How to Run PowerShell Script (Mac/Windows/Linux) - Powershell
- Java SE JDBC with Prepared Statement Parameterized Select Example - Java
- How to Initialize ArrayList Java with Values - Java