Windows 7 windows 7 powershell找不到dsquery和dsget

Windows 7 windows 7 powershell找不到dsquery和dsget,windows-7,powershell,Windows 7,Powershell,我试着跑 dsquery group -samid "Development Environment" | dsget group -members -expand > C:\dev.txt 我有一个: 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

我试着跑

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

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
术语“dsquery”不能识别为cmdlet、函数、脚本文件或可操作程序的名称。检查spe
删除名称,或者如果包含路径,请验证路径是否正确,然后重试。
第1行字符:8

+dsquery安装后,您必须转到程序和功能(appwiz.cpl)->打开或关闭Windows功能->并启用远程服务器管理工具


这是一篇老文章,但在阅读了这篇文章后,我找到了出现此问题的原因

它与权利有关。我收到了同样的错误。DSquery:术语“DSquery”不能识别为cmdlet、函数、脚本文件或脚本的名称 程序。”

所以,右键单击EED,以“我的域管理员帐户”运行,然后导入模块activedirectory

它现在起作用了


希望这对下一个人有所帮助。

我确实这样做了,但在添加AD DS工具时显示了一个错误。不,根本没有帮助。现在我正在卸载系统还原的早期阶段并重新安装KB958830。我重新安装了,但仍然没有成功。如果我选择安装Active Directory管理中心,将显示错误消息。谢谢。这真的很有帮助。