{"title":"Setting Up Multiple Business Central Web Server Instances Using PowerShell","url":"https://jonas-paprotka.de/docs/dev-itpro/deployment/configure-multiple-web-server-instances/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/deployment/configure-multiple-web-server-instances, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/deployment/configure-multiple-web-server-instances","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn how to use Windows PowerShell to set up more than one web server instance on Internet Information Service (IIS) for the Business Central web client.","date":"2024-10-28","meta":{"topic":"how-to"},"outline":[{"level":1,"title":"Setting Up Multiple Business Central Web Server Instances Using PowerShell","slug":"setting-up-multiple-business-central-web-server-instances-using-powershell","at":0,"chars":8439},{"level":2,"title":"Get started with the Business Central Web Server cmdlets","slug":"get-started-with-the-business-central-web-server-cmdlets","at":1333,"chars":1303},{"level":2,"title":"Creating Business Central Web Server instances","slug":"creating-business-central-web-server-instances","at":2636,"chars":5288},{"level":3,"title":"Get Access to the WebPublish folder","slug":"get-access-to-the-webpublish-folder","at":2686,"chars":713},{"level":3,"title":"Decide on the site deployment type for the instance","slug":"decide-on-the-site-deployment-type-for-the-instance","at":3399,"chars":2291},{"level":4,"title":"RootSite","slug":"rootsite","at":3745,"chars":597},{"level":4,"title":"SubSite","slug":"subsite","at":4342,"chars":1348},{"level":3,"title":"Run the New-NAVWebServerInstance cmdlet","slug":"run-the-new-navwebserverinstance-cmdlet","at":5690,"chars":2234},{"level":2,"title":"Modifying a Business Central Web Server instance","slug":"modifying-a-business-central-web-server-instance","at":7924,"chars":362},{"level":2,"title":"Related information","slug":"related-information","at":8286,"chars":153}],"text":"# Setting Up Multiple Business Central Web Server Instances Using PowerShell\nAlthough you can use the Business Central Setup to install the Business Central Web Server components and create a single web server instance in IIS for client connection, there might be scenarios when you want to set up multiple instances. For example, you could set up a separate Business Central Web Server instance for the different companies of a business. For this scenario, you can use the Business Central Web Server PowerShell cmdlets, which are outlined in the following table.\nCmdlet|Description\nhttps://learn.microsoft.com/powershell/module/navwebclientmanagement/New-NAVWebServerInstance|Creates a new Business Central Web Server instance and binds this instance to a Business Central Server instance.\nhttps://learn.microsoft.com/powershell/module/navwebclientmanagement/Set-NAVWebServerInstanceConfiguration|Specifies configuration values for a named Business Central Web Server instance.\nhttps://learn.microsoft.com/powershell/module/navwebclientmanagement/Get-NAVWebServerInstance|Gets the information about the Business Central Web Server instances that are registered on a computer.\nhttps://learn.microsoft.com/powershell/module/navwebclientmanagement/Remove-NAVWebServerInstance|Removes an existing Business Central Web Server instance.\n## Get started with the Business Central Web Server cmdlets\nThe Business Central Web Server cmdlets are contained in the PowerShell script module NAVWebClientManagement.psm1, which is available on the Business Central installation media (DVD).\nThe module is installed with the Business Central Server or the Business Central Web Server components.\nThere are different ways to launch this module and start using the cmdlets:\n If you're working on the computer where the Business Central Server was installed, run the Business Central Administration Shell as an administrator.\n  See Business Central PowerShell Cmdlets<https://learn.microsoft.com/powershell/business-central/overview>.\n Otherwise, start Windows PowerShell as an administrator, and use the https://learn.microsoft.com/powershell/module/microsoft.powershell.core/import-module cmdlet to import the NAVWebClientManagement.psm1 file:\n  ```powershell\n  Import-Module -Name [filepath]\n  ```\n  For example:\n  ```powershell\n  Import-Module -Name \"C:\\Program Files\\Microsoft Dynamics 365 Business Central\\NNN\\Service\\NAVWebClientManagement.psm1\"\n  ```\n  Replace NNN with the Business Central Server instance folder name, like 240. Learn more about cmdlets at the Windows PowerShell docs<https://learn.microsoft.com/powershell/scripting/overview>.\n## Creating Business Central Web Server instances\n### Get Access to the WebPublish folder\nTo create a new web server instance, you need access to the WebPublish folder that contains the content files for the Business Central Web Server components.\n This folder is available on the Business Central installation media (DVD) and has the path \"DVD\\WebClient\\Microsoft Dynamics NAV\\NNN\\Web Client\\WebPublish\". NNN indicates the Business Central version like 240 or 230.\n This folder has the path \"C:\\\\Program Files\\\\Microsoft Dynamics 365 Business Central\\\\NNN\\Web Client\\WebPublish\" if you installed the Business Central Web Server components.\nYou can use either of these locations or you can copy the folder to more convenient location on your computer or network.\n### Decide on the site deployment type for the instance\nWhen you create a new Business Central Web Server instance, you can choose to create either a RootSite or SubSite type. Each instance type has a different hierarchical structure in IIS, which influences its configuration and the URLs for the accessing from the Business Central Web client.\n#### RootSite\nA RootSite instance is a root-level web site that is complete with content files for serving the Business Central Web client. It's configured with its own set of bindings for accessing the site, such as protocol (http or https) and communication port. The structure in IIS looks like this:\n```\n- Sites\n  - BusinessCentralWebSite (web site)\n    + nn-NN (language versions)\n    + www (content)\n    navsettings.json\n    ...\n```\nThe Business Central Web client URL for the RootSite instance has the format:\n`https://[WebserverComputerName]:[port]`\nFor example: `https://localhost:8080`.\n#### SubSite\nA SubSite instance is a web application that is under a container web site. The container web site is configured with a set of bindings, but the site itself has no content files. The content files are contained in the application (SubSite). The SubSite inherits the bindings from the container web site. This deployment is the deployment type that is created when you install Business Central Web Server components in the Setup wizard. Using the New-NAVWebServerInstance cmdlet, you can add multiple SubSite instances in the container web site. The structure in IIS for two instances looks like this in IIS:\n```\n- Sites\n  - BusinessCentralWebSite (web site)\n    - BusinessCentralWebInstance1 (application)\n      + nn-NN (language versions)\n      + www\n      navsettings.json\n      ...\n    - BusinessCentralWebInstance2 (application)\n      + nn-NN (language versions)\n      + www\n      navsettings.json\n      ...\n```\nThe Business Central Web client URL of a SubSite instance is longer than a RootSite because it also contains the application's alias (or virtual path) for the instance, which you define. The URL for a SubSite instance has the format:\n`https://[WebserverComputerName]:[port]/[WebServerInstance]`\nFor example: `https://localhost:8080/BusinessCentralWebInstance1` and `https://localhost:8080/BusinessCentralWebInstance2`.\n### Run the New-NAVWebServerInstance cmdlet\nAt the command prompt, run the New-NAVWebServerInstance cmdlet. The following are simple examples for creating a RootSite and SubSite deployment type.\nRootSite example:\n```powershell\nNew-NAVWebServerInstance -WebServerInstance MyBCWebsite -Server MyBCServer -ServerInstance MyBCServerInstance -SiteDeploymentType RootSite -WebSitePort 8081 -PublishFolder \"C:\\Web Client\\WebPublish\"\n```\nSubSite example:\n```powershell\nNew-NAVWebServerInstance -WebServerInstance MyWebApp -Server MyBCServer -ServerInstance MyBCServerInstance -SiteDeploymentType Subsite -ContainerSiteName MySiteContainer -WebSitePort 8081 -PublishFolder \"C:\\WebClient\\WebPublish\"\n```\n Substitute MyBCWebsite with the name that you want to give the web application in IIS for the web server instance. If you're creating a SubSite deployment type, this name becomes part of the URL for opening the Business Central Web client application, for example, `https://MyWebServer:8081/MyWebApp`.\n Substitute MyBCServer to the name of the computer that is running the Business Central Server to which you want to connect.\n Substitute MyBCServerInstance with the name of the Business Central Server instance to use.\n Substitute MySiteContainer with name of the container web site under which you want to add the instance. If you specify a name that doesn't exist, a new container web site containing the new web server instance is created.\n Substitute 8081 with the port number that you want to bind the instance to. If you don't specify a port number, then port 80 is used.\n Substitute C:\\WebClient\\WebPublish with the path to your WebPublish folder. By default, the cmdlet uses in the 'C:\\\\Program Files\\\\Microsoft Dynamics 365 Business Central\\\\NNN\\Web Client' folder. So if you omit this parameter, make sure that default folder path includes the Business Central Web Server components version that matches the Business Central Server instance.\n> NOTE\n> This command only sets the required parameters of the New-NAVWebServerInstance cmdlet. The cmdlet has several other parameters that can use to configure the web server instance. See https://learn.microsoft.com/powershell/module/navwebclientmanagement/New-NAVWebServerInstance.\n## Modifying a Business Central Web Server instance\nAfter you create the web server instance, if you want to change its configuration, you can use the Set-NAVWebServerInstanceConfiguration cmdlet. Or, you can modify the configuration file (navsettings.json) of the instance directly. See Configuring Web Server Instances<../administration/configure-web-server>.\n## Related information\nBusiness Central Web Server Overview<web-server-overview>\nConfiguring Web Server Instances<../administration/configure-web-server>"}