Share via

获取AD中所有有管理权限的安全组成员

连国 于 570 Reputation points
2024-01-11T05:16:45.0766667+00:00

技术专家您好 近期有这么一个需求,需要对AD域中所有组(包括内置的安全组,以及自定义的安全组),这些组具有在AD中有别于普通域用户组,具有一定管理权限的组。 将这些组的成员筛选出来,放到excel文件中 如何实现

Windows for business | Windows Client for IT Pros | Directory services | Active Directory

Answer accepted by question author

Thameur-BOURBITA 36,531 Reputation points Moderator
2024-01-11T09:37:15.7433333+00:00

Hi @连国 于

Here is a english forum, Please try to post in English next time. Regarding your question ,You should use a powershell command to export all members of each group in CSV file. Below a example of Powershell command you can use in your script:

Get-ADGroupMember -identity $group |   
    Get-ADUser |   
        Select-Object GivenName, SamaccountName, @{name="group";expression={$group}} |  
            Export-CSV c:\members.csv -NoTypeInformation  

Please don't forget to accept helpful answer

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.