我们是否需要Active Directory域控制器来运行任何PowerShell命令?
我正在尝试运行一个调用 Get-Aduser
命令的PowerShell脚本。
类似于这个问题的东西
但是我会得到错误 Get-Aduser:无法找到使用Active Directory Web服务运行的默认服务器。
我已导入ActivedIrecotry模块,并且还运行了连接 - azuread命令。
是否必须让AD域控制器运行PowerShell命令?
我们可以像使用Active Directory Admin的凭据一样运行PowerShell命令,例如 Get-Aduser
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。
ActiveIverectory
使用rsat工具安装的模块CMDLET
需要与Active Directory基础架构进行通信,以检索有关该域和存储在其中的对象的信息。通常(如果不是完全)涵盖了其他第一方Powershell模块,这些模块还与Adds之外的Active Directory Services集成在一起;服务需要传达给PowerShell模块才能正确运行的服务。
但是,您对Active Directory和Azure AD之间的差异有根本的误解。它们是独立的服务,并且不以相同的方式运行。高级别:
Active Directory 是Microsoft提供的自托管本地目录服务解决方案。这是您自1999年以来所认识和喜欢的全功能广告。
通常使用
rsat工具
功能和activeiveRectory
PowerShell模块安装。Azure AD 是Azure中Microsoft提供的完全独立的托管目录服务。它无法提供接近1:1特征奇偶校验的任何地方,具有本地 Active Directory 。这并不是说这是一个小产品;它只是不同的产品。
值得一提的是, azure ad 有一些方便的功能您不会使用本地 Active Directory 。通常通过Azure门户或
az。*
PowerShell模块可从PowerShell Gallery提供。您不能使用
ActiveIverectory
模块来管理 Azure Ad ,就像您无法使用az一样。目录。当然,您可以在单个系统上安装两个模块,您只需要使用正确的服务使用正确的模块即可。
Yes. The
ActiveDirectory
module cmdlets installed withRSAT Tools
need to communicate with Active Directory infrastructure to retrieve information about the domain and objects stored within it.This generally (if not wholly) encompasses other first-party PowerShell modules integrating with Active Directory services outside of ADDS as well; the services need to be communicable for the PowerShell modules to function correctly.
However, you have a fundamental misunderstanding of the differences between Active Directory and Azure AD. They are separate services and do not function the same way. At a high level:
Active Directory is the self-hosted on-prem directory services solution provided by Microsoft. This is the fully-functional AD you have known and loved since 1999.
Generally administered with the
RSAT Tools
feature and theActiveDirectory
PowerShell module it installs.Azure AD is a completely separate managed-directory service available from Microsoft in Azure. It does not provide anywhere close to a 1:1 feature parity with on-prem Active Directory. That isn't to say it is a lesser product; it is simply a different product.
It is worth a mention that there are handy features available with Azure AD that you don't get with on-prem Active Directory. Generally administered via the Azure Portal, or the
Az.*
PowerShell modules available from the PowerShell Gallery.You cannot use the
ActiveDirectory
module to manage Azure AD just as you cannot use theAz.*
modules to manage on-prem Active Directory. You can have both modules installed on a single system of course, you just need to use the correct module with the correct service.