Windows 7 PowerShell无法找到DSQuery和DSGet。

9
我尝试运行。
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

我已经安装了Windows 7 Service Pack 1的远程服务器管理工具,但对我仍然无效。请帮忙。
活动目录管理中心安装失败。
这是错误消息:
2个回答

7
安装完成后,您需要前往“程序和功能”(appwiz.cpl)-> 打开或关闭Windows功能 -> 并启用远程服务器管理工具。

enter image description here


我做了这个,但是当我添加AD DS工具时出现了一个错误。 - lannyboy
不,这完全没有帮助。现在我正在放弃先前的系统恢复阶段并重新安装KB958830。 - lannyboy
我重新安装了,但仍然没有运气。如果我选择安装Active Directory管理中心,则会显示错误消息。 - lannyboy

0

这是一篇旧文章,但在阅读了本文后,我找到了我遇到问题的原因。

这与权限有关。我收到了相同的错误提示:“DSquery:未将“DSquery”识别为cmdlet、函数、脚本文件或可运行程序的名称。”

所以,我右键单击,使用“我的域管理员帐户”运行,然后导入模块活动目录。

现在它可以正常工作了。

希望这能帮助下一个人。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接