我是 Powershell 和 AD 的新手。我在 PS 中使用 AD 模块时遇到了麻烦。使用任何命令都会出现以下错误:
Get-ADDomain : Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services
running.
At line:2 char:1
+ Get-ADDomain -Current LocalComputer
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (lon.intensive.int:ADDomain) [Get-ADDomain], ADServerDownException
+ FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirectory.Management.Commands.GetADDomain
Run Code Online (Sandbox Code Playgroud)
有趣的是我可以使用 ADExplorer 并查看域、用户及其所有属性。ADExplorer 与 Powershell 中的脚本有何不同?