如何使用Powershell将位置ad:设置为其他active directory域

如何使用Powershell将位置ad:设置为其他active directory域,powershell,active-directory,powershell-3.0,Powershell,Active Directory,Powershell 3.0,我使用PowerShell 3在Windows 7工作站上安装了Active Directory模块,当我使用“Set Location AD:”时,它正在使用我的当前域 是否可以将我的基本位置设置为其他域 Import-Module ActiveDirectory Set-Location AD: Get-ChildItem (显示当前DC信息) 我想切换到其他广告服务器。您可以试试这个。假设您的域名是fabrikam.local Import-Module ActiveDirectory

我使用PowerShell 3在Windows 7工作站上安装了Active Directory模块,当我使用“Set Location AD:”时,它正在使用我的当前域

是否可以将我的基本位置设置为其他域

Import-Module ActiveDirectory
Set-Location AD:
Get-ChildItem
(显示当前DC信息)


我想切换到其他广告服务器。

您可以试试这个。假设您的域名是fabrikam.local

Import-Module ActiveDirectory
New-PSDrive -Name ADFAB -PSProvider ActiveDirectory -Server "servername.fabrikam.local" -Scope Global -root "//RootDSE/"
Set-Location ADFAB:

你可以试试这个。假设您的域名是fabrikam.local

Import-Module ActiveDirectory
New-PSDrive -Name ADFAB -PSProvider ActiveDirectory -Server "servername.fabrikam.local" -Scope Global -root "//RootDSE/"
Set-Location ADFAB:

你可以试试这个。假设您的域名是fabrikam.local

Import-Module ActiveDirectory
New-PSDrive -Name ADFAB -PSProvider ActiveDirectory -Server "servername.fabrikam.local" -Scope Global -root "//RootDSE/"
Set-Location ADFAB:

你可以试试这个。假设您的域名是fabrikam.local

Import-Module ActiveDirectory
New-PSDrive -Name ADFAB -PSProvider ActiveDirectory -Server "servername.fabrikam.local" -Scope Global -root "//RootDSE/"
Set-Location ADFAB:

只是想补充一下塞维耶斯的回答

如果您使用的是已装载的ntdsutil AD快照,则只需使用“localhost:10389”作为服务器,使用在使用dsamain装载快照时使用的任何端口即可


+1尽管如此,为了能够使用Get ACL和Set ACL恢复域控制器对象上损坏的权限,我需要新的PSDrive。我以为AdminsHolder会自己解决这个问题,因为Domain Controller组是一个受保护的组,但即使尝试手动启动该过程,我们也没有看到任何结果。

只是想补充一下ssaviers的答案

如果您使用的是已装载的ntdsutil AD快照,则只需使用“localhost:10389”作为服务器,使用在使用dsamain装载快照时使用的任何端口即可


+1尽管如此,为了能够使用Get ACL和Set ACL恢复域控制器对象上损坏的权限,我需要新的PSDrive。我以为AdminsHolder会自己解决这个问题,因为Domain Controller组是一个受保护的组,但即使尝试手动启动该过程,我们也没有看到任何结果。

只是想补充一下ssaviers的答案

如果您使用的是已装载的ntdsutil AD快照,则只需使用“localhost:10389”作为服务器,使用在使用dsamain装载快照时使用的任何端口即可


+1尽管如此,为了能够使用Get ACL和Set ACL恢复域控制器对象上损坏的权限,我需要新的PSDrive。我以为AdminsHolder会自己解决这个问题,因为Domain Controller组是一个受保护的组,但即使尝试手动启动该过程,我们也没有看到任何结果。

只是想补充一下ssaviers的答案

如果您使用的是已装载的ntdsutil AD快照,则只需使用“localhost:10389”作为服务器,使用在使用dsamain装载快照时使用的任何端口即可

+1尽管如此,为了能够使用Get ACL和Set ACL恢复域控制器对象上损坏的权限,我需要新的PSDrive。我认为adminsholder会自行解决这个问题,因为域控制器组是一个受保护的组,但即使尝试手动启动该过程,我们也没有看到任何结果