Primary command line switches for unattended mode
The primary (top-level, scenario-defining) command line switches that are available in unattended Setup mode in Exchange 2016 or Exchange 2019 are described in the following table:
Switch | Description |
---|---|
/IAcceptExchangeServerLicenseTerms | Note: Beginning with the September 2021 Cumulative Updates, this switch is no longer available in Exchange Server 2016 or Exchange Server 2019. This switch is required in all unattended setup commands (whenever you run Setup.exe with any additional switches). If you don't use this switch, you'll get an error. |
/IAcceptExchangeServerLicenseTerms_DiagnosticDataON /IAcceptExchangeServerLicenseTerms_DiagnosticDataOFF | Note: These switches are available beginning with the September 2021 Cumulative Updates for Exchange Server 2016 and Exchange Server 2019. One of these switches is required in all unattended setup commands (whenever you run Setup.exe with any additional switches). If you don't use one of these switches, you'll get an error. To accept the license terms and send diagnostic data to Microsoft use the switch with suffix DiagnosticDataON. To accept the license terms but not send diagnostic data to Microsoft use the switch with suffix DiagnosticDataOFF. |
/Mode: (or /m: | Valid values are: > Install: Installs Exchange on a new server using the Exchange server roles specified by the /Roles switch. This is the default value if the command doesn't use the /Mode switch. > Uninstall: Uninstalls Exchange from a working server. > Upgrade: Installs a Cumulative Update (CU) on an Exchange server. > RecoverServer: Recovers an Exchange server using the existing Exchange server object in Active Directory after a catastrophic hardware or software failure on the server. For instructions, see Recover Exchange servers. |
/Roles: (or /Role: | This switch is required in /Mode:Install commands. Valid values are: > Mailbox (or mb): Installs the Mailbox server role and the Exchange management tools on the local server. This is the default value. You can't use this value with EdgeTransport. > EdgeTransport (or et): Installs the Edge Transport server role and the Exchange management tools on the local server. You can't use this value with Mailbox. > ManagementTools (or mt or t): Installs the Exchange management tools on clients or other Windows servers that aren't running Exchange. |
/PrepareAD (or /p) /PrepareSchema (or /ps) /PrepareDomain: /PrepareAllDomains (or /pad) | Use these switches to extend the Active Directory schema for Exchange, prepare Active Directory for Exchange, and prepare some or all Active Directory domains for Exchange. |
/NewProvisionedServer[: /RemoveProvisionedServer: | The /NewProvisionedServer switch creates the Exchange server object in Active Directory. After that, a member of the Delegated Setup role group can install Exchange on the server. The /RemoveProvisionedServer switch removes a provisioned Exchange server object from Active Directory before Exchange is installed on the server. |
/AddUmLanguagePack: /RemoveUmLanguagePack: | Note: These switches aren't available in Exchange 2019. They're only available in Exchange 2016. Adds or removes Unified Messaging (UM) language packs from existing Exchange 2016 Mailbox servers. UM language packs enable callers and Outlook Voice Access users to interact with the UM system in those languages. You can't add or remove the en-US language pack. You can install language packs on existing Mailbox servers by using the /AddUmLanguagePack switch or by running the UMLanguagePack. |
Optional command line switches for unattended mode
The optional (supporting) command line switches that are available in unattended Setup mode in Exchange 2016 or Exchange 2019 are described in the following table:
Switch | Valid Values | Default Values | Available With |
---|---|---|---|
/ActiveDirectorySplitPermissions: | True or False | False | /Mode:Install /Roles:Mailbox or /PrepareAD commands for the first Exchange server in the organization. |
/AdamLdapPort: | A valid TCP port number | 50389 | /Mode:Install /Roles:EdgeTransport commands |
/AdamSslPort: | A valid TCP port number | 50636 | /Mode:Install /Roles:EdgeTransport commands |
/AnswerFile:" (or af:" | The name and location of a text file (for example,"D:\Server data\answer.txt"). | n/a | /Mode:Install /Roles:Mailbox or /Mode:Install /Roles:EdgeTransport commands |
/CustomerFeedbackEnabled: | True or False | False | /Mode:Install and /PrepareAD commands |
/DbFilePath:" | A folder path and an .edb filename (for example, "D:\Exchange Database Files\DB01\db01.edb"). | %ExchangeInstallPath%Mailbox\ %ExchangeInstallPath% is %ProgramFiles%\Microsoft\Exchange Server\V15\ or the location you specified with the /TargetDir switch. | /Mode:Install /Roles:Mailbox commands |
/DisableAMFiltering | n/a | n/a | /Mode:Install /Roles:Mailbox commands |
/DomainController: (or /dc: | The server name (for example, DC01) or FQDN (for example, dc01.contoso.com) of the domain controller. | A randomly-selected domain controller in the same Active Directory site as the target server where you're running Setup. | All /Mode commands (except when you're installing an Edge Transport server) or /PrepareAD, /PrepareSchema, /PrepareDomain and /PrepareAllDomains commands |
/DoNotStartTransport | n/a | n/a | /Mode:Install /Roles:Mailbox, /Mode:Install /Roles:EdgeTransport, and /Mode:RecoverServer commands. |
/EnableErrorReporting | n/a | Disabled | /Mode:Install, /Mode:Upgrade, and /Mode:RecoverServer commands |
/InstallWindowsComponents | A folder path (for example, "E:\Exchange Database Logs"). | %ExchangeInstallPath%Mailbox\ %ExchangeInstallPath% is %ProgramFiles%\Microsoft\Exchange Server\V15\ or the location you specified with the /TargetDir switch. | /Mode:Install /Roles:Mailbox commands |
/LogFolderPath:" | A folder path (for example, "E:\Exchange Database Logs"). | %ExchangeInstallPath%Mailbox\ %ExchangeInstallPath% is %ProgramFiles%\Microsoft\Exchange Server\V15\ or the location you specified with the /TargetDir switch. | /Mode:Install /Roles:Mailbox commands |
/MdbName:" | A database filename without the .edb extension (for example, "db01") | Mailbox Database <10DigitNumber> (for example, Mailbox Database 0139595516). | /Mode:Install /Roles:Mailbox commands |
/OrganizationName:" (or /on:" | A text string (for example, "Contoso Corporation"). | Blank in command line setup; First Organization in the Exchange Setup wizard. | /Roles:Mailbox or /PrepareAD commands for the first Exchange server in the organization. |
/SourceDir:" (or /s:" | A folder path (for example, "Z:\Exchange). | The ServerRoles\UnifiedMessaging folder on the Exchange installation media. | /AddUmLanguagePack commands in Exchange 2016 (not available in Exchange 2019) |
/TargetDir:" (or /t:" | A folder path (for example, "D:\Program Files\Microsoft\Exchange"). | %ProgramFiles%\Microsoft\Exchange Server\V15\ | /Mode:Install and /Mode:RecoverServer commands |
/TenantOrganizationConfig:" | A folder path (for example "C:\Data") | n/a | /Mode:Install or /PrepareAD commands. |
/UpdatesDir:" (or /u:" | A folder path (for example, "D:\Downloads\Exchange Updates"). | The Updates folder at the root of the Exchange installation media. | /Mode:Install, /Mode:Upgrade, /Mode:RecoverServer, and /AddUmLanguagePack commands. |
Information source: https://learn.microsoft.com/en-us/exchange/plan-and-deploy/deploy-new-installations/unattended-installs?view=exchserver-2019