【发布时间】:2015-09-19 06:58:21
【问题描述】:
在以下脚本中,它将打印组的所有用户。但是,缺少域名(某些用户在不同的 Windows 域中)?
$computer = [ADSI]"WinNT://$server,computer"
$computer.psbase.children | ? {
$_.psbase.schemaClassName -eq 'group'
} | % {
$gn = $_.name.ToString()
write-host $gn
write-host "------"
$group =[ADSI]$_.psbase.Path
$group.psbase.Invoke("Members") | % {
$_.GetType().InvokeMember("Name", 'GetProperty', $null, $_, $null)
}
}
【问题讨论】:
-
请不要移动目标。如果您有新问题:提出新问题。
标签: windows powershell active-directory adsi