Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

windows 7 powershell cannot find dsquery and dsget

I tried to run

dsquery group -samid "Development Environment" | dsget group -members -expand > C:\dev.txt

and I had this:

The term 'dsquery' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spe
lling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:8
+ dsquery <<<<
    + CategoryInfo          : ObjectNotFound: (dsquery:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I already installed Windows Remote Server Administration Tools for Windows 7 with Service Pack 1. But it is still not working for me.

Please help.

The only one cannot be installed

The Active Directory Administrative Center failed to be installed.

This is the error message

like image 595
lannyboy Avatar asked Dec 15 '11 02:12

lannyboy


People also ask

How do I run Dsquery in powershell?

It is available if you have the Active Directory Domain Services (AD DS) server role installed. To use dsquery, you must run the dsquery command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

Where is Dsquery EXE located?

The dsquery. dll is on most, if not all, Windows systems in C:\Windows\System32\dsquery. dll by default. The binary dsquery.exe may already be present on some servers at C:\Windows\System32\dsquery.exe .

What is Dsquery user?

The Dsquery user command is used to find the users in the active directory that matches the specified search criteria. dsquery user command retrieves user information from the active directory. The result can be piped as input to the other directory service command-line tools like dsget, Dsmod, Dsmove, or Dsrm.


1 Answers

After installing, you have to go to Programs And Features (appwiz.cpl ) -> Turn Windows Features On or Off -> And enable the Remote Server Administration tools.

enter image description here

like image 180
manojlds Avatar answered Nov 03 '22 21:11

manojlds