Applies To:
GroupID 10 and above
Problem Statement:
If you have migrated from on-prem Exchange to 0365, you would notice that the Targetaddress attribute is populated for users whose mailboxes are migrated from on-prem Exchange, but empty for the new users whose mailboxes are directly created in Exchange online.
In case you are using this attribute in any of your Smart Group queries, then the new users will not be included in the membership of the respective Smart Groups.
Example:
Let’s assume you have all your Smart Groups in one OU and they are all querying one object type (for example, Exchange Users). To change the object type in all these Smart Group queries to Users, follow the steps below.
Note: | Since this change will apply to all Smart Groups in an OU, it is recommended to have an Imanami Customer Support representative on board while you perform this activity to avoid data loss. |
Solution:
- On the GroupID server, launch GroupID Management Shell as an administrator and run the following command:
Get-SmartGroup -SearchContainer "Enter DN of OU which contains all Smart groups" | Select Name |Export-CSV "C:/Smartgroup.csv" -NoTypeInformation
This will export a CSV file named 'Smartgroup.csv' to the root of the C drive on the GroupID server. -
Open the CSV file and add a column, ObjectTypes, in it. Set its value to Users for each exported group and save the changes. It should be as:
- Now run the following command from GroupID Management Shell:
Import-Csv "C:/Smartgroup.csv" | ForEach-Object {Set-SmartGroup -Identity $_.Name -Objecttypes $_.ObjectTypes} We are importing the modified CSV file back into GroupID and using it to apply the change to all the Smart Groups present in the CSV.
-
Go to GroupID Management Console to verify if changes have been made to Smart Groups and test to update a couple of them.
Backup Procedure:
In case you want to take a backup of the previous object types, you can use the original CSV that you exported in the first step and specify Exchange Users instead of Users in the ObjectTypes column. Other than that, you can take a backup of the SQL database before applying this change, so that you can restore the backup in case of failure.
Reference:
GroupID Management Shell User Guide