The term 'Get-ADUser' is not recognized as the name of a cmdlet
I have used the following query to list the users in a windows 2008 server, but failed and got the below error.
The exception is given below. Can anyone help me to solve this?
8 Answers 8
If the ActiveDirectory module is present add
before your code.
To check if exist try:
ActiveDirectory module is default present in windows server 2008 R2, install it in this way:
For have it to work you need at least one DC in the domain as windows 2008 R2 and have Active Directory Web Services (ADWS) installed on it.
For Windows Server 2008 read here how to install it
![]()
Check [here] for how to add the activedirectory module if not there by default. This can be done on any machine and then it will allow you to access your active directory "domain control" server.
To prevent problems with stale links (I have found MSDN blogs to disappear for no reason in the past), in essence for Windows 7 you need to download and install Remote Server Administration Tools (KB958830). After installing do the following steps:
- Open Control Panel -> Programs and Features -> Turn On/Off Windows Features
- Find "Remote Server Administration Tools" and expand it
- Find "Role Administration Tools" and expand it
- Find "AD DS And AD LDS Tools" and expand it
- Check the box next to "Active Directory Module For Windows PowerShell".
- Click OK and allow Windows to install the feature
Windows server editions should already be OK but if not you need to download and install the Active Directory Management Gateway Service. If any of these links should stop working, you should still be able search for the KB article or download names and find them.
The term ‘get-aduser’ is not recognized as the name of a cmdlet in Windows 10 PowerShell
In this Azure AD tutorial, we will discuss how to fix an error the term ‘get-aduser’ is not recognized as the name of a cmdlet in Windows 10 PowerShell that comes while trying to retrieve users from Azure active directory.
Table of Contents
The term ‘get-aduser’ is not recognized as the name of a cmdlet in Windows 10 PowerShell
The error comes as the term ‘get-aduser’ is not recognized as the name of a cmdlet in Windows 10 PowerShell.
Powershell: The term ‘Get-ADUser’ is not recognized as the name of a cmdlet
The full error was coming as:
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.
At line:1 char:1
- CategoryInfo : ObjectNotFound: (get-aduser:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException

get aduser not recognized
get-aduser is not recognized as the name of a cmdlet powershell [Solved]
Solution -1
If you are getting the error “The term ‘Get-ADUser’ is not recognized as the name of a cmdlet, function, script file, or operable program” or “get aduser not recognized”. Then you can try out the below solutions.
get aduser is not recognized [Solved]
The first step you need to try out is, You need to enable the Active Directory Module for Windows Powershell feature in your machine. Follow the below steps to enable the Active Directory Module for Windows Powershell option.
- Click on the start menu in your machine and then search for “windows features”
- Now the next step is to click on “Turn Windows features on or off”
- Then you need to Expand the Remote Server Administration Tools option
- Now, Again Expand Role Administration Tools option
- Then, Expand AD DS and AD LDS Tools option
- Make sure to tick the checkbox for Active Directory Module for Windows Powershell option
- Now, You need to Confirm that it’s okay to install the feature
If the above solution didn’t work for you, then nothing to worry, try out the below solution
get aduser not recognized [Solved]
Solution – 2
- Open the Window PowerShell or PowerShell ISE with Run as Administrator mode

get-aduser not recognized
2. Run the below PowerShell command to find out the path for your PowerShell Profile where it is located.
You can able to see, it returned me with the below path
C:\Users\Bijay\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1

get-aduser : the term ‘get-aduser’ is not recognized as the name of a cmdlet
3. The next step is, Navigate to C:\Users\Bijay\Documents\, You will not find a folder with the name WindowsPowerShell.
Since the folder is not present, create a folder with the name WindowsPowerShell, then you can use the text editor to create a file called Microsoft.PowerShell_profile.ps1 and add the below line
Now make sure to save the file and then close all your Open PowerShell Sessions. Now This solution should work for you. You can run the script now, it should not give any error this time.
Get-ADUser not recognized [Solved]
Solution – 3
If you are getting the error the term ‘get-aduser’ is not recognized as the name of a cmdlet while working in PowerShell in Windows 10, Windows Server 2016 or Windows Server 2012/2012 R2, then run the below steps to fix it:
Open Windows command prompt as an administrator and run the below command.
Once you installed it, you can verify by running the below command:
Now you will not get the error if you will try to execute the Active Directory command get-aduser.
The term ‘get-aduser’ is not recognized as the name of a cmdlet windows 10 PowerShell [Solved]
Now, let me tell you the mistake I was doing.
A very silly mistake.
And my case I was using the Active Directory command (get-aduser) rather than the Azure Active Directory command (Get-AzADUser) to retrieve the users from Azure AD.
When I run the below command:
Note: We will not have AD configured in the local windows 10 system.
So this is How you can able to fix the error “get aduser not recognized” or “The term ‘get-aduser’ is not recognized.” by following any of the solutions mentioned above.
The term ‘get-aduser’ is not recognized as the name of a cmdlet (Windows 2008 server) [Solved]
If you are using Windows 2008 server and you got The term ‘get-aduser’ is not recognized as the name of a cmdlet, then below are the steps that can help you to fix the issue.
The first step is, check if the Azure Active Directory module is present using the below PowerShell cmdlet
Once, you will run the above command, you should able to see the Azure Active Directory module present on your machine, then run the below PowerShell cmdlet as the next step
If the Azure Active Directory module is not present and you are using the Windows 2008 server then, before running the above command, you need to install the Azure Active Directory module.
The term ‘get-aduser’ is not recognized as the name of a cmdlet (Windows Server 2008 R2) [Solved]
if you are using Windows Server 2008 R2, then the Azure Active Directory module is by default present in your machine, you will have to install it using the below PowerShell cmdlet in the same Order.
Note: Make sure that the Active Directory Web Services (ADWS) is installed on your machine.
Once, you will install the Azure Active Directory module in your machine, run the below PowerShell cmdlet.
check if the Azure Active Directory module is present using the below PowerShell cmdlet
Then run the below PowerShell cmdlet as the next step
The term ‘get-aduser’ is not recognized as the name of a cmdlet (Windows 7) [Solved]
If you are using Windows 7 and you got The term ‘get-aduser’ is not recognized as the name of a cmdlet, then below are the steps that can help you to fix the issue.
- Navigate to the Control Panel and open it -> click on the Programs and Features -> Turn On/Off Windows Features
- Then you need to find out “Remote Server Administration Tools” and expand it.
- Now, Expand the “Role Administration Tools” node.
- Then, Expand AD DS and AD LDS Tools option.
- Make sure to tick the checkbox for Active Directory Module for Windows Powershell option
- Finally, click on the OK button to confirm the installation.
Note: One important point to note down here is, If you are using Windows 10 and you are not able to see the “Remote Server Administration Tools” option in your system then you need to install the RSAT tools for windows 10 using the below steps.
-
now and install it on your machine.
- Once you have installed the RSAT tools, make sure to restart your machine once so that the changes will be reflected in your machine. Now you should be able to enable the Active Directory Module for Windows Powershell option using the above steps.
Get aduser
Description
Whenever there is a requirement to find out Active Directory (AD) users in your domain, Get-Aduser PowerShell command can help you to quickly find the AD users in your domain.
Syntax:
There are some Prerequisites needed to work with Get-Aduser PowerShell command.
Prerequisites
Below are some Prerequisites needed to work with the Get-Aduser PowerShell command
- You must log in with an AD user account
- Make sure, you have the PowerShell Active Directory module installed on your machine
There are different ways to use the Get-Aduser PowerShell command
Find User Account With Identity
The Identity parameter helps you to retrieve the user quickly from your domain and the only thing is you need to know the name of the user that you have to send as a parameter along with the Get-AdUser PowerShell cmdlet.
You can use different parameters like Name, SAMAccountName, SID and GUID, etc.
Example:
Get-ADUser With Filter
If you don’t know the name and if you want to retrieve the user based on some filter condition then you can use the -Filter and LDAPFilter parameter. You can use different identifiers like the Where-Object and givenName, etc.
Example
Get-AdUser With Properties Parameter
You can also use the Get-AdUser with the Properties Parameter. The Property parameter can be used with one or more comma-delimited attributes. You can also use the Property parameter with the givenName.
Example– Get all of the properties for a specific user
Get-AdUser with OU
You can also use the Get-AdUser to filter by OU and for that, you need to use the SearchBase parameter with the Get-AdUser command. The SearchBase helps you to begin the search for a user account for a specific OU and it accepts the distinguished name (DN) of the OU.
Example
Using the Filter of * means, it will match all user accounts.
List all Domain Users
You can list down all the domain users using the asterisk as parameter * along with the Get-AdUser PowerShell cmdlet. The syntax will be like below
Get All Properties
We can also able retrieve all the attributes of the Ad user using the below PowerShell command.
Get-AdUser with Get-Help
You can get all the Parameter details of the Get-AdUser PowerShell command using the Get-Help command along with the Get-AdUser command. The syntax will be like below
Get-AdUser Export To CSV File
If you want to make a report of the list of users in a CSV file. You can use the below PowerShell cmdlet to export the list of users to a CSV file quickly.
List Only Enabled Users using Get-AdUser
you can get the list of the users who having AD user ID enabled or the list of active users using the below PowerShell cmdlet.
You may like following Azure tutorials:
Wrapping Up
I hope this Azure tutorial, helps us to fix the below errors on windows 7, Windows 10, Windows Server 2016, or Windows Server 2012/2012 R2, etc
Get aduser не распознано как имя командлета
Командлет Get-ADObject может не запускаться в Windows Server 2008 R2 , несмотря на то, что в документации Microsoft написано, что он присутсвует в данном дистрибутиве Windows.
При запуске Get-ADObject появляется ошибка:
Имя "Get-ADObject" не распознано как имя командлета, функции, файла скрипта или выполняемой программы. Проверьте правильность написания имени, а также наличие и правильность пути, после чего повторите попытку.
+ CategoryInfo : ObjectNotFound: (Get-ADObject:String) [], CommandNotFoundException
На самом деле этот командлет есть, и располагается он в инструменте "Active Directory Administration with Windows PowerShell" ( https://technet.microsoft.com/ru-RU/library/dd378937.aspx ). По опыту, данный инструмент нормально работает как минимум в Power Shell v.2.
Чтобы командлет стал доступен, необходимо выполнить команду импорта модуля:
После этой команды все командлеты для управления доменом станут доступны. Доступны они будут в текущем сеансе Windows Power Shell.
Термин «Get-ADUser» не распознается как имя командлета.
Я использовал следующий запрос, чтобы перечислить пользователей на сервере Windows 2008, но потерпел неудачу и получил следующую ошибку.
Исключение приведено ниже. Может ли кто-нибудь помочь мне решить эту проблему?
задан 09 июля ’13, 13:07
8 ответы
Если модуль ActiveDirectory присутствует, добавьте
перед вашим кодом.
Чтобы проверить, существует ли попытка:
Модуль ActiveDirectory по умолчанию присутствует в Windows Server 2008 R2, установите его следующим образом:
Чтобы он работал, вам нужен хотя бы один контроллер домена в домене с Windows 2008 R2 и на нем должны быть установлены веб-службы Active Directory (ADWS).
Для Windows Server 2008 читать здесь как установить его
ответ дан 13 мая ’15, 08:05

np 🙂 хотя я бы изменил его на: get-module activedirectory -listavailable — Шей Леви
@ShayLevy Да, лучше проверить конкретный модуль! Мое намерение состояло в том, чтобы помочь пользователю 1805353 узнать, какой модуль можно загрузить. — CB.
У меня Windows Server 2008 R2 SP1 и нет activedirectory модуль присутствует здесь. — бахреп
Мне нужно было исправить регистр, чтобы импорт работал. ‘получить-модуль ActiveDirectory’ — Дж Маурер
@bahrep Вам нужно установить его раньше: Import-Module ServerManager и Add-WindowsFeature RSAT-AD-PowerShell . По крайней мере один DC в доменах должен быть 2008 R2 и иметь Active Directory Web Services (ADWS) установлен на нем. — CB.
Проверьте [Вот] как добавить модуль ActiveDirectory, если его нет по умолчанию. Это можно сделать на любой машине, и тогда это позволит вам получить доступ к вашему серверу «управления доменом» Active Directory.
РЕДАКТИРОВАТЬ
Чтобы предотвратить проблемы с устаревшими ссылками (в прошлом я обнаружил, что блоги MSDN беспричинно исчезают), по сути, для Windows 7 вам необходимо скачать и установить Средства удаленного администрирования сервера (KB958830). После установки проделайте следующие шаги:
- Откройте Панель управления -> Программы и компоненты -> Включение/выключение компонентов Windows.
- Найдите «Средства удаленного администрирования сервера» и разверните его.
- Найдите «Инструменты администрирования ролей» и разверните его.
- Найдите «Инструменты AD DS и AD LDS» и разверните его.
- Установите флажок «Модуль Active Directory для Windows PowerShell».
- Нажмите «ОК» и разрешите Windows установить эту функцию.
Серверные версии Windows уже должны быть в порядке, но если нет, вам необходимо загрузить и установить Служба шлюза управления Active Directory. Если какая-либо из этих ссылок перестанет работать, вы все равно сможете найти статью в базе знаний или имена загрузок и найти их.