我知道使用PowerShell的AD模块,我们可以检索域计算机的详细信息,并将其导出为CSV。 我的域位于AWS Directory Service中,并且在该域下有一台计算机。 我试过Get-ADComputer ,但是显示这个错误:
Get-ADComputer : Unable to find a default server with Active Directory Web Services running.
是否有另一种方法可以在AWS Directory Service域中检索域计算机的列表?
来自AWS Directory Service的简单AD不支持通过PowerShell进行通信。 这是因为Simple AD基于Samba4,而Samba4则不支持直接通过PowerShell进行通信。
正如另一个线程中提到的那样,您可以使用AWS API执行一些基本操作,例如从PowerShell cmdlet中描述您当前在AWS中运行的目录,但实际上无法查询目录中的计算机。
您将不得不使用不同的目录pipe理工具来pipe理您的简单AD。 您可以在AWS Directory Service的文档中find有关如何使用其他工具pipe理目录的更多信息。 http://docs.aws.amazon.com/directoryservice/latest/adminguide/directory_management.html
AWS 为AWS Directory Service提供了自己的一组cmdlet ,您可以与AD模块配合使用。
特别感兴趣的是Get-DSDirectory ,它返回一个带有属性AccessUrl的DirectoryDecription对象。