Views:

Applies To:

GroupID 9 and above - GroupID Management Shell

Business Requirement:

I have a large number of groups and Dynasties in the directory, I want a list of groups with their owners to track the owner and additional owners of each group.

More Information:

We need to resolve the objects added as group owners and additional owners in order to get their distinguished names. Then we use these resolved names in a query to fetch the owners and additional owners through GroupID Management Shell and export to a CSV file.

Steps:

Follow these steps to get the owners and additional owners for both managed groups (Smart Groups and Dynasties) and unmanaged (static) groups.

  1. Launch GroupID Management Shell.

  2. Type the following commandlet for Smart Groups:

    Get-SmartGroup | select Name, ManagedBy_Resolved, @{n='AdditionalOwner' ; e={foreach($s in $_.AdditionalOwner.split(",")){(Get-User -Identity $s).Name +","} }}| Export-csv "C:\smartgroups.csv" -NoTypeInformation

    This commandlet will export all the owners and additional owners of Smart Groups to a CSV file.

    The cmdlet saves your CSV file to the C:\ directory with the name, smartgroups.csv. To change the directory, replace “C” in C:\smartgroups.csv with your desired directory.

  3. To get a list of owners and additional owners for all types of groups, use the following command:

    Get-Group | select Name, ManagedBy_Resolved, @{n='AdditionalOwner' ; e={foreach($s in $_.AdditionalOwner.split(",")){(Get-User -Identity $s).Name +","} }}| Export-csv "C:\smartgroups.csv" -NoTypeInformation

    You can get more information by appending your desired attributes to the cmdlet (for example, smartGroupType, security, expiration, whencreated, UPN, criteria SearchContainer, Identity, MaxItemsToDisplay, ObjectType, LdapFilter, SmartFilter, etc.)

Reference:

GroupID Management Shell User Guide