如何从 AWS Directory Service 检索域计算机的详细信息?

ser*_*qns 4 powershell active-directory amazon-web-services aws-directory-service

我知道使用 powershell 的 AD 模块,我们可以检索域计算机的详细信息并将它们导出为 csv。我的域在 AWS Directory Service 中,并且我在此域下有一台计算机。我试过了Get-ADComputer,但它显示了这个错误:

Get-ADComputer : Unable to find a default server with Active Directory Web Services running.
Run Code Online (Sandbox Code Playgroud)

是否有另一种方法可以在 AWS Directory Service 域中检索域计算机的列表?

小智 5

来自 AWS Directory Service 的 Simple AD 不支持通过 PowerShell 进行通信。这是因为 Simple AD 基于 Samba4,而 Samba4 不支持直接通过 PowerShell 进行通信。

正如在另一个线程中提到的,您可以使用 AWS API 执行一些基本操作,例如从 PowerShell cmdlet 描述您当前在 AWS 中运行的目录,但您实际上无法查询目录中的计算机。

您必须使用不同的目录管理工具来管理您的 Simple AD。您可以在 AWS Directory Service 的文档中找到有关如何使用其他工具管理目录的更多信息。http://docs.aws.amazon.com/directoryservice/latest/adminguide/directory_management.html