查询组成员
$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}
转载于:https://www.cnblogs.com/dreamer-fish/p/4837799.html