Infos support.microsoft.com
cd $env:exchangeinstallpath\bin
.\Setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms
.\Setup.exe /PrepareAD /IAcceptExchangeServerLicenseTerms
.\Setup.exe /PrepareAllDomains /IAcceptExchangeServerLicenseTerms
2019 CU11 or 2016 CU22 or later
cd $env:exchangeinstallpath\bin
.\Setup.exe /IAcceptExchangeServerLicenseTerms_DiagnosticDataOFF /PrepareSchema
.\Setup.exe /IAcceptExchangeServerLicenseTerms_DiagnosticDataOFF /PrepareAD
.\Setup.exe /IAcceptExchangeServerLicenseTerms_DiagnosticDataOFF /PrepareAllDomains