The Get-ADUser cmdlet is one of the most commonly used tools to get information about the users in an Active Directory domain.
You can use this cmdlet for auditing, reporting, troubleshooting, and automation tasks (like a bulk user management or compliance checks). In this tutorial, we’ll cover the most common Get-ADUser errors and show how to fix them.
Common Get-ADUser Errors and Fixes
The Get-ADUser is not recognized error means that PowerShell cannot resolve the cmdlet in the current session. Here are the common causes for this error:
- The Active Directory PowerShell module is not installed/not available in the current PowerShell environment.
- The module cannot be imported because of a missing file, dependency, or compatibility issue.
- The module is installed but has not been imported, and module auto-loading is unavailable, disabled, or unsuccessful.
A machine does not have to be joined to the domain for PowerShell in order to recognize Get-ADUser. Domain membership and connectivity to a DC are separate issues and you should investigate them in case the cmdlet is available but the AD query fails.
In some cases, you might receive an error when you use this cmdlet in a PowerShell console or in a PS1 script:
Get-ADUser : The term ‘Get-ADUser’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
+ CategoryInfo : ObjectNotFound: (Get-ADUser:String)
[], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

Active Directory Module Missing or Not Loaded
This error usually means that PowerShell cannot find/load the Active Directory module in the current session. PowerShell 3.0 and later supports module auto-loading, so an explicit Import-Module ActiveDirectory is not normally required when the module is installed, discoverable, and auto-loading is enabled. Importing the module explicitly is useful for troubleshooting because it can reveal loading/compatibility errors.
So, try importing the AD PowerShell module into your session:
Import-Module ActiveDirectory If the module files are missing from the default PowerShell directories, an error occurs:
Import-Module: The specified module ‘ActiveDirectory’ was not loaded because no valid module file was found in any module directory.
ResourceUnavailable: (ActiveDirectory:String) [Import-Module], FileNotFoundException + FullyQualifiedErrorId : Modules_ModuleNotFound, Microsoft.PowerShell.Commands.ImportModuleCommand
Check if the Active Directory module is installed
To check if the Active Directory module is installed, run the command:
Get-Module -Name ActiveDirectory -ListAvailable 
If the command returns nothing, it means that the module is missing.
Installing RSAT Active Directory
The AD PowerShell module is part of the RSAT Active Directory management toolkit. The most common reason why Get-ADUser doesn’t work is a missing Active Directory module. Let’s look at how to verify and install it.
How to install AD PowerShell module through the Settings panel
On Windows 11, you can install the RSAT Active Directory tools, including the Active Directory PowerShell module, through Settings:
Windows 10 reached end of standard support on October 14, 2025. If you still manage Windows 10 devices, RSAT installation may remain available, but the OS should be covered by an applicable support arrangement, such as the Extended Security Updates (ESU) program where eligible.
Go to Settings > System > Optional Features > Add an optional feature;

Select from the list RSAT: Active Directory Domain Services and Lightweight Directory Services Tools and check to install.

PowerShell command to install the RSAT AD toolkit
On supported Windows client versions, you can install the RSAT Active Directory tools using PowerShell:
Note that you should run PowerShell as Administrator before installing RSAT. Installing Windows capabilities typically requires an elevated session and may also be restricted by your organization’s device-management policies.
Add-WindowsCapability -Online -Name "Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0" 
After installation, you should check if the RSAT Active Directory capability is installed, then import the module and check that the cmdlet is available. Note that restarting PowerShell/Windows is not normally required.
Get-WindowsCapability -Online -Name "Rsat.ActiveDirectory*"|select name,state 
Installing the RSAT AD module through the Server Manager GUI
On Windows Server 2025, 2022, 2019, and 2016, you can install the Active Directory PowerShell module through Server Manager (Server Manager > Add Roles and Features > Features > Remote Server Administration Tools > Role Administration Tools > AD DS and AD LDS Tools > Active Directory Module for Windows PowerShell) or using the following PowerShell command:
You need to run PowerShell as Administrator/use an appropriately privileged admin session on the target server in order to install Windows features.
Install-WindowsFeature -Name RSAT-AD-PowerShell 
You are now ready to import the AD PowerShell module into your session:
Import-Module ActiveDirectory 
Try using Get-ADUser and other module cmdlets in your PowerShell scripts.
Note. Do not install the Active Directory PowerShell module by copying individual DLL files from another machine. The module may depend on additional files and components, and manually copying DLLs does not ensure a supported/functional installation. Install the RSAT Active Directory tools on supported Windows clients, or install the appropriate AD management components on Windows Server.
After module installation, run the command to check if cmdlet is available:
Get-Command Get-ADUser Now verify it actually works:
Get-ADUser -Filter * -ResultSetSize 1 If Get-Command returns Get-ADUser, the cmdlet is available in the current session. However, PowerShell module auto-loading may load the AD module during this check, so the result does not prove that the module was already loaded beforehand.
To check if the module is currently loaded, run the command:
Get-Module -Name ActiveDirectory If the command returns a module object, ActiveDirectory is loaded in the current session. No output means the module is not currently loaded; it does not mean the module is missing.
Finally, you need to test an actual directory query to confirm that the cmdlet can communicate with AD and retrieve an object.
Basic Get-ADUser command usage examples
Get-ADUser -Identity jdoe
Get-ADUser -Filter *
Get-ADUser -Filter "Department -eq 'IT'" Where can you run Get-ADUser?
Domain-Joined Workstations: Fully supported, provided that RSAT (Remote Server Administration Tools) is installed and the Active Directory PowerShell module is enabled.
Domain Controllers: Works when the Active Directory PowerShell module is installed. If missing, install it with Install-WindowsFeature -Name RSAT-AD-PowerShell.
Non-Domain/Workgroup Machines: Supported only through explicit credential passing (using -Credential) and a connection to a reachable DC, or via PowerShell Remoting (Enter-PSSession).
Example:
Get-ADUser -Filter * -Server dc01.contoso.com -Credential (Get-Credential) PowerShell 7 compatibility. The Active Directory PowerShell module can work in PowerShell 7 on supported Windows configurations. Try importing it natively first:
Import-Module ActiveDirectory -ErrorAction Stop
Get-Command Get-ADUser In case the module fails to load/required functionality is unavailable, you need to check the installed module version and its compatibility with PowerShell 7. Where necessary, use the Windows PowerShell compatibility feature:
Import-Module ActiveDirectory -UseWindowsPowerShell This compatibility mode runs the module through a background Windows PowerShell 5.1 process and uses implicit remoting. Returned objects are serialized, so some behavior may differ from a native import. Don’t forget to test the required commands and object properties in your target environment before deploying automation.
Error: “Unable to find a default server with Active Directory Web Services running”
You may face Unable to find a default server with Active Directory Web Services running error occurs when the AD module is installed but cannot reach a DC. Check our tutorial on how to fix this error.
Active Directory vs. Microsoft Entra ID. Get-ADUser queries on-premises Active Directory Domain Services (AD DS); it does not directly retrieve cloud-only users from Microsoft Entra ID. To query Entra ID users, you should use the Microsoft Graph PowerShell SDK, for example, Get-MgUser, with the required permissions and consent. The legacy AzureAD and MSOnline PowerShell modules are deprecated and retired; you should use Microsoft Graph PowerShell for new Entra ID automation.
Common Get-ADUser Filter Syntax Errors
Incorrect filter syntax can cause different errors depending on whether you use PowerShell expression syntax with -Filter or LDAP syntax with -LDAPFilter. The exact error message depends on the specific syntax mistake.
Here is an incorrect PowerShell filter syntax:
Get-ADUser -Filter Name -like '*John*' This command may produce a parameter-binding error because the filter expression is not passed as a single argument.
The correct command is:
Get-ADUser -Filter "Name -like '*John*'" Incorrect: using LDAP syntax with -Filter:
Get-ADUser -Filter "(department=IT)" Here is a correct PowerShell syntax:
Get-ADUser -Filter "Department -eq 'IT'" Alternatively, use the LDAP filter with the -LDAPFilter parameter:
Get-ADUser -LDAPFilter "(department=IT)" Use -Filter for PowerShell-style expressions and -LDAPFilter for LDAP filter strings.
Error: “Access is denied”
This error does not necessarily mean that the account lacks basic read permissions in AD. Authenticated domain users can generally read standard user attributes unless permissions have been restricted.
Check the following before changing permissions or using a more privileged account:
Credentials and target domain: You need to check if the current security context is correct and that -Server points to a reachable DC in the intended domain.
Cross-domain/cross-forest access: Check trust relationships and the permissions available to the account in the target domain/forest.
PowerShell Remoting: In case the command runs inside a remote session and accesses another server, you need to investigate Kerberos delegation and the double-hop problem.
Restricted permissions/policies: Check the relevant object’s ACLs, attribute-level permissions, and any applicable DC security restrictions.
For automation, you need to use a dedicated service account with only the required delegated read permissions, or a group Managed Service Account (gMSA) where supported by the execution environment. Do not use Domain Admin credentials for routine directory queries.
To test a query against a specific DC, you can use an authorized account and specify the target server:
Get-ADUser -Identity 'jdoe' `
-Server 'dc01.contoso.com' `
-ErrorAction Stop Don’t forget to replace the example user and server with values from your environment. If the query still fails, you should inspect the complete error details and identify the failing access path before changing permissions.
Wrapping up
Most Get-ADUser errors are caused by missing modules/incorrect syntax. In order to avoid the majority of problems and use the cmdlet effectively in your scripts and automation tasks, you need to make sure that RSAT is installed and using proper filter syntax.
| Error | Likely cause | Recommended action |
|---|---|---|
Get-ADUser is not recognized / CommandNotFoundException | The Active Directory module is unavailable/cannot be loaded | Check Get-Module -ListAvailable ActiveDirectory and try Import-Module ActiveDirectory. Install RSAT on a supported Windows client with Add-WindowsCapability, or install RSAT-AD-PowerShell on Windows Server with Install-WindowsFeature. |
Unable to find a default server with Active Directory Web Services running | A DC cannot be discovered/reached, or ADWS is unavailable | Check DNS, domain controller discovery, network connectivity, and TCP port 9389. |
The search filter cannot be recognized | Incorrect filter syntax | Use PowerShell filter syntax with -Filter or LDAP syntax with -LDAPFilter. |
Access is denied | The current account lacks the required permissions or is using the wrong security context | Verify the account and directory permissions. Use -Credential if a different authorized account is required. |

