Views:

Applies To:

GroupID 10 – GroupID Management Shell

Business Case:

We have many Smart Groups in an organizational unit where the following object types are included in group membership: users, contacts, and groups.

The object types to be included in a group’s membership are specified on the General tab of the group’s Query Designer. However, for all Smart Groups in that OU, we have a requirement to change the object type to users with mailboxes, users with external e-mail addresses, and contacts with external e-mail addresses. How can we do this in bulk instead of changing the object types for each group?

Solution:

This requirement can be achieved using a GroupID Management Shell cmdlet.

Note: The cmdlet takes time to process, depending on the number of Smart Groups in the OU. Before running it in your production environment, it is recommended to first run it on an OU containing a few Smart Groups and verify the results.

Steps:

  1. Launch GroupID Management Shell.

  2. Run the following command:

    Get-SmartGroup -SearchContainer "Distinguished Name of Organizational Unit” -SmartFilter "(IMSGManagedGroupType=2)" | Set-SmartGroup -ObjectTypes "1",”2”,”3”

    This command will change the object type of all Smart Groups in the mentioned OU to Users with Mailboxes, Users with External e-mail addresses, and Contacts with External e-mail addresses. Use the following table to set object types as per your requirement after the -ObjectTypes switch.

    This table lists the number associated with each object type:

    Object Type Number
    Users with Mailboxes 1
    Users with External e-mail addresses 2
    Contacts with External e-mail addresses 3
    Mail-Enabled Groups 4
    Mail-Enabled Public Folders 5
    Users 6
    Contacts 7
    Groups 8
    Workstations 9
    Servers 10
    Domain Controllers 11

Reference:

GroupID Management Shell – User Guide