GroupID 8.x, 9.x
I have a large number of managed groups and Dynasties in the directory. I want to export all of these to a CSV file and sort them accordingly.
For more information on managed groups, see How GroupID classifies groups.
Use GroupID Management Shell to get a list of managed groups and Dynasties in the directory. The ManagedGroupType attribute represents the different types of groups and can have the following outputs:
1 = Non-managed group
2 = Smart Group
3 = Parent Dynasty
4 = Middle Dynasty
5 = Leaf Dynasty
6 = Password Expiry SmartGroup
- Launch GroupID Management Shell.
- Type the following command:
Get-SmartGroup | select DisplayName, ManagedGroupType | Sort-Object ManagedGroupType | Export-CSV "C:\list.csv" –NoTypeInformation
This cmdlet will export all Smart Groups and Dynasties to a CSV file.
The Get-SmartGroup cmdlet retrieves managed groups from one or more containers on a domain, and match the given criteria. Sample output is as follows:
As mentioned earlier, ManagedGroupType 2 represents Smart Groups, 3 represents parent Dynasties, and so on.
The cmdlet saves your CSV file in the C:\ directory with the name, list.csv. To change the directory, add your desired directory in place of C:\list.csv. The CSV file is sorted in ascending order based on the ManagedGroupType attribute.
You can get more information by appending the desired attributes to the cmdlet (for example, smartGroupType, expiration, managed by, whencreated, UPN, criteria SearchContainer, SearchContainersScopeList, Identity, ShouldReturnCollection, MaxItemsToDisplay, ObjectType, LdapFilter, SmartFilter, etc.) and sort the groups based on those attributes as well.
GroupID Management Shell - User Guide