logo

“Get ADUser Not Recognized” Error in PowerShell

The “Get-ADUser not recognized” error occurs when the Active Directory module for PowerShell is missing. On Windows 10, install it via RSAT; on Windows Server, add it through Server Manager or Install-WindowsFeature. After installation, import the module with Import-Module ActiveDirectory to enable Get-ADUser and other AD cmdlets.

The Get-ADUser PowerShell cmdlet is very helpful for Active Directory user management. But what if you try to use Get-ADUser and get the error below?

The term ‘Get-ADUser’ is not recognized as the name of a cmdlet, function, script file or operable program.

“Get ADUser Not Recognized” Error in PowerShell

This error simply means that the Active Directory module for PowerShell is not available on your machine. This module is installed by default on domain controllers, if you want to use PowerShell remotely, you need to install the module on your machine.

Read on to learn how to install the Active Directory module on Windows 10 or Windows Server and then import it to your current session so you can run Get-ADUser without getting an error message.

Simplify Active Directory Management

Resolve AD user errors faster with Netwrix Directory Manager

We care about security of your data.

Privacy Policy

Step 1: Install the PowerShell Active Directory Module

Installing PowerShell on Windows 10

The Windows PowerShell cmdlets are included in the Windows Remote Server Administration Tools (RSAT). To install RSAT on Windows 10 version 1809 or later, use the following command:

Get-WindowsCapability -Name RSAT.ActiveDirectory* -Online | Add-WindowsCapability -Online

If you are running an earlier version of Windows, you will need to download and install RSAT manually.

Installing PowerShell on Windows Server

The procedures for installing PowerShell on Windows Server are the same across all the following versions:

  • Windows Server 2019
  • Windows Server 2008 and 2008 R2
  • Windows Server 2012 and 2012 R2
  • Windows Server 2016

You can use either of the following two methods.

Method 1: Install using the Wizard

  1. In the Start menu, Navigate to Start?and then?Server Manager.
  2. Click Manage in the upper right corner and then choose Add Roles & Features.
  3. If the wizard displays a Before you Begin?dialog, click Next.
  4. Select Role-based or Feature-based Installation and click Next.
  5. Click the Select a Server from the Server pool?option and choose your server. Click Next.
  6. On the?Server Roles?page, no changes are required, so simply click Next.
  7. On the Features?page, expand?Remote Server Administration Tools ? Role Administration Tools ? AD DS and AD LDS Tools, andclick Active Directory Module for Windows PowerShell. Then click Next.
  8. On the Confirmation?page, click Install. When the installation is complete, click Close.

Method 2: Install using PowerShell

  1. Click Start and search for “PowerShell”. Choose “Windows PowerShell”?from the search results.
  2. Install the PowerShell AD module by running the Install-WindowsFeature cmdlet. To add child features, be sure to include the parameters shown here:
Install-WindowsFeature -Name “RSAT-AD-PowerShell” -IncludeAllSubFeature
Method 2: Install using PowerShell

Step 2: Import the Active Directory PowerShell Module

Once the module is installed, you need to add it to your current session. The following steps are valid for both Windows 10 and all Windows Server versions:

  1. Click Start and search for “PowerShell”. Choose?WindowsPowerShell?from the search results.
  2. Run the following command to verify that the module is available on your system:
Get-Module -Name ActiveDirectory -ListAvailable
Step 2: Import the Active Directory PowerShell Module
  1. Import the module using the?Import-Module?cmdlet as follows:
Import-Module -Name ActiveDirectory

Next Steps

Now that you have installed and imported the Active Directory PowerShell module, you can avoid the dreaded “Get-ADUser Not Recognized” error.

Master the Basics of PowerShell Scripting

Download the Windows PowerShell Scripting for Beginners eBook today!

We care about security of your data.

Privacy Policy
With more than two decades in the software security industry, Tyler Reese is intimately familiar with the rapidly evolving identity and security challenges that businesses face today. Currently, he serves as the product director for the Netwrix Identity and Access Management portfolio, where his responsibilities include evaluating market trends, setting the direction for the IAM product line, and, ultimately, meeting end-user needs. His professional experience ranges from IAM consultation for Fortune 500 companies to working as an enterprise architect of a large direct-to-consumer company. He currently holds the CISSP certification.