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,
- Move Copy Migrate SharePoint OneDrive files folders to different site collection location
- How to generate client id and secret to register SharePoint App with OAuth
- How to share SharePoint site or document with all users in organization
- Get-ADUser PowerShell - Get AD user details using email address
- error CAML Query containing special characters
- Access URL for SharePoint Tenant Admin Center (Online Office 365)
- Fix SharePoint Error - The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started
- SharePoint - The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
- How to delete SharePoint List Item programmatically using C#.Net
- How to Share Microsoft SharePoint Site with Users or Groups
- JSON column formatting to preview SharePoint Online file on mouse hover
- SharePoint List redirect user after submitting form NewForm.aspx
- See actual SharePoint error exception modify web.config
- SharePoint Server 2016 IT Preview Deprecated Removed features
- How to create SharePoint Document Library
- How to Get or Set SharePoint Document ID _dlc_DocId using PowerShell
- How to disable SharePoint subsite creation option for owners
- PowerShell - How to use Try Catch Finally blocks for error exception handling (Windows/SharePoint)
- SharePoint error - Your organization doesn't allow sharing with users from this domain. Please contact your IT department for help. (OSE403)
- [Solved] SharePoint Search Internal server error exception
- How to wrap column text in SharePoint Online Modern List Grid View using JSON formatting
- How to extend retiring SharePoint 2010 Workflows and continue with Office 365
- Changed AD user display name showing old name in SharePoint
- How to hide or remove quick launch left navigation from SharePoint Online Modern site page
- How to enable anonymous public access for SharePoint Online site collection, file, folder without login ?
More Posts:
- zsh: command not found [fix] macOS - zsh
- Convert String to int in Java - Java
- Where is .zshrc file located in macOS - MacOS
- Reading .xls and .xlsx Excel file using Apache POI Java Library - Java
- Encode/Decode URL Query String in Notepad++ - NotepadPlusPlus
- Parse XML file in Java using DOM Parser - Java
- Youtube spacebar not working in search on macOS Safari - MacOS
- How to change SharePoint Online site collection or subsite URL address - SharePoint