如何解决在其他服务器上获取ADObject
因此,我试图使用Powershell来自动化一些我想做的任务。我们构建了一个AD工具,但是它非常适合查找。
AD对象在另一个域中,它告诉我:
Get-ADObject : 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.
服务器运行ADWS很好,因为我使用LDAP和其他工具来浏览它。
它确实在该服务器上使用了不同的凭据,并即时将它们传入。
这是我的代码的样子。经过编辑。
$secpasswd = ConvertTo-SecureString "Oher Domain Password" -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ("Other Domain Username",$secpasswd)
Get-ADObject -Filter "" -Server "My other domain Server" -Credential $mycreds
任何帮助都很好
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。