1 min readUpdate SMTP Primary Address for Migrated Public Folder

1 min readUpdate SMTP Primary Address for Migrated Public Folder

Public Folder is a feature available in both Microsoft Exchange
on-premises and Office365. Public Folders are used to share information
within your organization. Public Folders can hold messages, notes,
calendar etc. Usually Public Folders are important asset that needs to
be maintained during the Office365 migration.

After the public folders are migrated to Office365, the primary smtp
address will be of form ‘yourdomain.onmicrosoft.com’. And administrators
want to fix the email address back to their domain name
‘yourdomain.com’. In this blog post we shall check how to change the
primary smtp address for the public folders.

Steps involved to achieve this

  1. Get all the public folders
  2. Replace the primary smtp address to point to your domain

** To get all the public folders we need to use powershell command
‘Get-MailPublicFolder’.
** To change the primary smtp address, we need to use
‘Set-MailPublicFolder’ command.

Powershell script

  Get-MailPublicFolder | 
  % { Set-MailPublicFolder -Identity $_.identity 
  -PrimarySmtpAddress $_.PrimarySmtpAddress.Replace("jijitechnologies.onmicrosoft.com","jijitechnologies.com") 
  -EmailAddressPolicyEnabled $false 
   }
                        

In the above script we are retrieving all the mail enabled public folder
and replacing the primary smtp address alone using Set-MailPublicFolder.
In the script replace the domain name with your domain name accordingly.

Migrate Everything to Microsoft 365

Exchange Online SharePoint Online OneDrive For Business Microsoft Teams Microsoft Planner Viva Engage (Yammer) Microsoft Bookings Microsoft Forms Power Automate Microsoft Power BI Exchange Online SharePoint Online OneDrive For Business Microsoft Teams Microsoft Planner Viva Engage (Yammer) Microsoft Bookings Microsoft Forms Power Automate Microsoft Power BI
  • No Data Loss
  • Zero Downtime
  • ISO-Certified Protection

Start your free 15-days trial today !


4.5 out of 5