查询组成员(group)
查询组成员
$groupname = "groupname" $members = (get-adgroup $groupname -properties member).member $members | % {(get-aduser $_).samaccountname |out-file e:\powershell\gusers.txt -append}
查询组成员
$groupname = "groupname" $members = (get-adgroup $groupname -properties member).member $members | % {(get-aduser $_).samaccountname |out-file e:\powershell\gusers.txt -append}