You will need to download the Exchange setup from VLSC and extract them to a local folder.
Then, open an elevated PowerShell and run
.\setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms
Assuming to do accept the terms…
Once this is done, you will be able to use the newly created attributes.
AADConnect however will not recognize them as yet, To rectify this rerun the AADConnect setup tool, located at “C:\Program Files\Microsoft Azure Active Directory Connect” (you should also have a shortcut on the desktop):
As shown on the screenshot select “Refresh connector schema” option, then press the Next button.
You will be prompted to enter credentials for the Azure AD connector, and to select the directories for which connectors you would like to perform the schema refresh.
You will now be able to manage any of the Exchange related attributes and the changes you made will be reflected in Exchange Online.