取AD组和成员在其中
我发现一个脚本来获取AD组及其成员。 我工作正常,但突然停止工作,并给出了一个错误。 在Win2008r2中使用PowerShell列出所有组及其成员 $Groups = Get-ADGroup -Properties * -Filter * -SearchBase "OU=Groups,DC=corp,DC=ourcompany,DC=Com" Foreach($G In $Groups) { Write-Host $G.Name Write-Host "————-" $G.Members } 错误 Get-ADGroup : The supplied distinguishedName must belong to one of the following partition(s): 'DC=AIA,DC=BIZ , CN=Configuration,DC=AIA,DC=BIZ , CN=Schema,CN=Configuration,DC=AIA,DC=BIZ , DC=ForestDnsZon es,DC=AIA,DC=BIZ , DC=DomainDnsZones,DC=AIA,DC=BIZ'. At C:\Users\zai_shanda\Desktop\adgroup.ps1:1 char:22 + $Groups = Get-ADGroup <<<< -Properties […]