Make On-Prem Public Folders Accessible to Exch Online Users-MailUser Obeject sync is confusing me
Howdy Exchange Brain Trust!
I’m working on a exchange server 2019 migration to EXO. Part of it is Public folders but at this stage I do not want to migrate them but simply make them working cross-premises for migrated users.
I’ve followed this official guide from MS – https://learn.microsoft.com/en-us/exchange/hybrid-deployment/set-up-modern-hybrid-public-folders but the first step (Synchronize MailUser objects script execution) output is confusing me.
[PS] C:Temp>.Sync-ModernMailPublicFolders.ps1 -CsvSummaryFile:sync_summary.csv
Checking for mail-enabled System folders…
Found 0 mail-enabled System folders.
Getting all public folders. This might take a while…
Found 200 public folders.
8 of those are mail-enabled.
1 folders are mail-enabled with no AD object.
7 folders are mail-enabled and are properly linked to an existing AD object.
Getting all MailPublicFolder objects…
10 MailPublicFolders are orphaned.
Building EntryId HashSets…
10 orphaned MailPublicFolder objects.
1 of those orphans point to mail-enabled folders that point to some other object.
2 of those orphans point to mail-disabled folders.
Results:
1 folders should be mail-disabled, either because the MailRecipientGuid
does not exist, or because they are system folders. These are listed in the file called:
C:TempFoldersToMailDisable.txt
After confirming the accuracy of the results, you can mail-disable them with the following command:
Get-Content “C:TempFoldersToMailDisable.txt” | % { Disable-MailPublicFolder $_ }
7 MailPublicFolders are orphans and should be deleted. They exist in Active Directory
but are not linked to any public folder. These are listed in a file called:
C:TempMailPublicFolderOrphans.txt
After confirming the accuracy of the results, you can delete them with the following command:
Get-Content “C:TempMailPublicFolderOrphans.txt” | % { $folder = ([ADSI](“LDAP://$_”)); $parent = ([ADSI]”$($folder.Parent)”); $parent.Children.Remove($folder) }
1 MailPublicFolders are duplicates and should be deleted. They exist in Active Directory
and point to a valid folder, but that folder points to some other directory object.
These are listed in a file called:
C:TempMailPublicFolderDuplicates.txt
After confirming the accuracy of the results, you can delete them with the following command:
Get-Content “C:TempMailPublicFolderDuplicates.txt” | % { $folder = ([ADSI](“LDAP://$_”)); $parent = ([ADSI]”$($folder.Parent)”); $parent.Children.Remove($folder) }
The duplicates we are deleting contain email addresses that might still be in use.
To preserve these, we generated a script that will add these to the linked objects for those folders.
After deleting the duplicate objects using the command above, run the script as follows to
populate these addresses:
.C:TempAddAddressesFromDuplicates.ps1
No mail-disabled public folders with proxy GUIDs were found.
2 MailPublicFolders are disconnected from their folders. This means they exist in
Active Directory and the folders are probably functioning as mail-enabled folders,
even while the properties of the public folders themselves say they are not mail-enabled.
This can be complex to fix. Either the directory object should be deleted, or the public folder
should be mail-enabled, or both. These directory objects are listed in a file called:
C:TempMailPublicFoldersDisconnected.txt
Done!
Confirm
Are you sure you want to perform this action?
Performing the operation “Remove File” on target “C:Tempsync_summary.csv”.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “Y”): Y
——————————————————-
My Questions are:
1. Does this mean the output of the script was just “observation only” no objects were synced?
2. Also received the error at the end after saying “Y” to the prompt to “Performing the operation “Remove File” on target. Is this only affecting the file removal or overall sync as well?
Any clarity around these questions are really appreciated !! Thank you!
Kev
Howdy Exchange Brain Trust! I’m working on a exchange server 2019 migration to EXO. Part of it is Public folders but at this stage I do not want to migrate them but simply make them working cross-premises for migrated users. I’ve followed this official guide from MS – https://learn.microsoft.com/en-us/exchange/hybrid-deployment/set-up-modern-hybrid-public-folders but the first step (Synchronize MailUser objects script execution) output is confusing me. [PS] C:Temp>.Sync-ModernMailPublicFolders.ps1 -CsvSummaryFile:sync_summary.csvChecking for mail-enabled System folders…Found 0 mail-enabled System folders.Getting all public folders. This might take a while…Found 200 public folders.8 of those are mail-enabled.1 folders are mail-enabled with no AD object.7 folders are mail-enabled and are properly linked to an existing AD object.Getting all MailPublicFolder objects…10 MailPublicFolders are orphaned.Building EntryId HashSets…10 orphaned MailPublicFolder objects.1 of those orphans point to mail-enabled folders that point to some other object.2 of those orphans point to mail-disabled folders. Results: 1 folders should be mail-disabled, either because the MailRecipientGuiddoes not exist, or because they are system folders. These are listed in the file called:C:TempFoldersToMailDisable.txtAfter confirming the accuracy of the results, you can mail-disable them with the following command:Get-Content “C:TempFoldersToMailDisable.txt” | % { Disable-MailPublicFolder $_ } 7 MailPublicFolders are orphans and should be deleted. They exist in Active Directorybut are not linked to any public folder. These are listed in a file called:C:TempMailPublicFolderOrphans.txtAfter confirming the accuracy of the results, you can delete them with the following command:Get-Content “C:TempMailPublicFolderOrphans.txt” | % { $folder = ([ADSI](“LDAP://$_”)); $parent = ([ADSI]”$($folder.Parent)”); $parent.Children.Remove($folder) } 1 MailPublicFolders are duplicates and should be deleted. They exist in Active Directoryand point to a valid folder, but that folder points to some other directory object.These are listed in a file called:C:TempMailPublicFolderDuplicates.txtAfter confirming the accuracy of the results, you can delete them with the following command:Get-Content “C:TempMailPublicFolderDuplicates.txt” | % { $folder = ([ADSI](“LDAP://$_”)); $parent = ([ADSI]”$($folder.Parent)”); $parent.Children.Remove($folder) }The duplicates we are deleting contain email addresses that might still be in use.To preserve these, we generated a script that will add these to the linked objects for those folders.After deleting the duplicate objects using the command above, run the script as follows topopulate these addresses:.C:TempAddAddressesFromDuplicates.ps1 No mail-disabled public folders with proxy GUIDs were found. 2 MailPublicFolders are disconnected from their folders. This means they exist inActive Directory and the folders are probably functioning as mail-enabled folders,even while the properties of the public folders themselves say they are not mail-enabled.This can be complex to fix. Either the directory object should be deleted, or the public foldershould be mail-enabled, or both. These directory objects are listed in a file called:C:TempMailPublicFoldersDisconnected.txt Done! ConfirmAre you sure you want to perform this action?Performing the operation “Remove File” on target “C:Tempsync_summary.csv”.[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “Y”): Y ——————————————————- My Questions are:1. Does this mean the output of the script was just “observation only” no objects were synced? 2. Also received the error at the end after saying “Y” to the prompt to “Performing the operation “Remove File” on target. Is this only affecting the file removal or overall sync as well? Any clarity around these questions are really appreciated !! Thank you! Kev Read More