New-NAVWebServerInstance

Creates new a Business Central Web Server instance.

Syntax

New-NAVWebServerInstance
   [-WebServerInstance] <String>
   [-Server] <String>
   [-ServerInstance] <String>
   [[-ClientServicesCredentialType] <String>]
   [[-ClientServicesPort] <Int32>]
   [[-ManagementServicesPort] <Int32>]
   [[-SiteDeploymentType] <String>]
   [[-ContainerSiteName] <String>]
   [[-WebSitePort] <Int32>]
   [[-AppPoolName] <String>]
   [[-PublishFolder] <String>]
   [[-DnsIdentity] <String>]
   [[-CertificateThumbprint] <String>]
   [-AddFirewallException]
   [[-HelpServer] <String>]
   [[-HelpServerPort] <Int32>]
   [<CommonParameters>]

Description

Creates a new Business Central Web Server instance on IIS for hosting the Business Central Web, Phone, and Tablet clients.

To create a new web server instance, you need access to the WebPublish folder that contains the content files for serving the Business Central Web client.

  • This folder is available on the Business Central installation media (DVD) and has the path 'DVD\WebClient\Business Central\130\Web Client\WebPublish'.
  • If you installed the Business Central Web Server Components, this folder has the path '%systemroot%\Program Files\Business Central\[version number]\Web Client\WebPublish'. You can use either of these locations or you can copy the folder to more convenient location on your computer or network.

Examples

EXAMPLE 1

New-NAVWebServerInstance -WebServerInstance DynamicsNAV110-UP -Server localhost -ServerInstance DynamicsNAV110 -ClientServicesCredentialType NavUserPassword

This example adds a new 'SubSite' web server instance under the existing default container website 'Business Central [Version] Web Client'. The new website instance will be configured for NavUserNamePassword authentication.

EXAMPLE 2

New-NAVWebServerInstance -WebServerInstance BC-Root -Server localhost -ServerInstance DynamicsNAV110 -SiteDeploymentType RootSite

This example adds a RootSite type web server instance called 'BC-Root'.

EXAMPLE 3

New-NAVWebServerInstance -PublishFolder 'C:\NAV\WebClient\Business Central\130\Web Client\WebPublish' -WebServerInstance DynamicsNAV110-Root -Server localhost -ServerInstance DynamicsNAV110 -SiteDeploymentType RootSite

This example adds a new RootSite type web server instance from a web publish folder that is located 'C:\NAV\WebClient\Business Central\130\Web Client\WebPublish'.

Parameters

-AddFirewallException

Specifies whether to allow inbound communication on the TCP port that is specified by the -WebSitePort parameter. If you use this parameter, an inbound rule for the port will be added to Windows Firewall.

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-AppPoolName

Specifies the application pool that the web server instance will use. If you do not specify an application pool, the default Business Central Web client application pool will be used.

Type:String
Position:10
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CertificateThumbprint

Specifies the thumbprint of the security certificate to use to configure an HTTPS binding for the web server instance. The certificate must be installed in the local computer certificate store.

Type:String
Position:13
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ClientServicesCredentialType

Specifies the credential type that is used for authenticating client users. The value must match the credential type that is configured for the Business Central Server instance that the web server instance connects to. Possible values include: Windows, UserName, NavUserPassword, or AccessControlService.

Type:String
Position:4
Default value:Windows
Accept pipeline input:False
Accept wildcard characters:False
-ClientServicesPort

Specifies the TCP port that is configured on the Business Central Server instance for communicating with client services. This value must match the client services port that is configured for the Business Central Server instance that the web server instance connects to.

Type:Int32
Position:5
Default value:7046
Accept pipeline input:False
Accept wildcard characters:False
-ContainerSiteName

Specifies the name the container website to which you want to add the web server instance. This setting is only used if the -SiteDeploymentType parameter is set to 'SubSite'. If you specify a container name that does not exist, a new site with is created as a container for the new web server instance. The website has no content but has binding on the port that specify with the -WebSitePort parameter.

Type:String
Position:8
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DnsIdentity

Specifies the DNS identity of the Business Central Server instance that the web server instance connects to. You set the value to either the Subject or common name (CN) of the security certificate that is used by the Business Central Server instance. This parameter is only relevant when the ClientServicesCredentialType is set to UserName, NavUserPassword, or AccessControlService because these authentication methods require that security certificates are used on the Business Central Server and web server instances o protect communication.

Typically, the Subject is prefixed with 'CN' (for common name), for example, 'CN = NavServer.com', but it can also just be 'NavServer.com'. It is also possible for the Subject field to be blank, in which case the validation rules will be applied to the Subject Alternative Name field of the certificate.

Type:String
Position:12
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-HelpServer

Specifies the name of computer that hosts the Business Central Help Server that provides online help to Business Central Web client users.

Type:String
Position:14
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-HelpServerPort

Specifies the TCP port (such as 49000) that is used by the Business Central Help Server on the computer specified by the -HelpServer parameter.

Type:Int32
Position:15
Default value:0
Accept pipeline input:False
Accept wildcard characters:False
-ManagementServicesPort

Specifies the TCP port that is configured on the Business Central Server instance for communicating with the management services. This value must match the management services port that is configured for the Business Central Server instance that the web server instance connects to.

This parameter is available only in Business Central April 2019 and later versions.

Type:Int32
Position:6
Default value:7045
Accept pipeline input:False
Accept wildcard characters:False
-PublishFolder

Specifies the location of the WebPublish folder that contains the content file that is required for Business Central Web client. If you omit this parameter, the cmdlet will look for the folder path '%systemroot%\Program Files\Business Central\[version number]\Web Client\WebPublish'

Type:String
Position:11
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Server

Specifies the name of the computer that the Business Central Server instance is installed on. This parameter accepts 'localhost' if the server instance and the new web server instance are installed on the same computer.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServerInstance

Specifies the name of the Business Central Server instance that the web server instance will connect to. You can specify either the full name of an instance, such as 'MicrosoftDynamicsNavServer$myinstance-2', or the short name such as 'myinstance-2'.

Type:String
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SiteDeploymentType

Specifies how the web server instance is installed IIS regarding its hierarchical structure and relationships. There are two possible values: RootSite and SubSite.

  • RootSite a adds the web server instance as root-level website in IIS that has its own bindings. The URL for the web server has the format: http://[WebserverComputerName]:[port].
  • SubSite adds the web server instance as an application under an existing or new container website, which you specify with the -ContainerSiteName parameter. If you are adding the SubSite instance to a new container website, you will also have to set the -WebSitePort parameter to setup the binding. You can add multiple SubSites to a container website. The SubSites inherit the binding defined on the container website.

If you omit this parameter, a subsite instance will be added to the default container website called 'Business Central [Version] Web Client'. If this contianer website does not exist, it will be added.

Type:String
Position:7
Default value:SubSite
Accept pipeline input:False
Accept wildcard characters:False
-WebServerInstance

Specifies the name to assign the web server instance in IIS, such as BC-AAD. If you are creating a SubSite type web server instance, the name will become part of the URL for the Business Central Web client. For example, if you set the parameter to MyNavWeb, the URL would be something like 'http://myWebServer:8080/MyNavWeb/'. If you are creating a RootSite type web server instance, the name is only used in IIS and does not become part of the URL. For example, if you set the parameter to MyNavWeb, the URL would be something like 'http://myWebServer:8080/'.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WebSitePort

Specifies the TCP port number under which the web server instance will be running. This is the port will be used to access the Business Central Web client and will be part of the URL. This parameter is only used if the -SiteDeploymentType parameter is set to 'RootSite' or set to 'SubSite' if you are creating a new container website.

Type:Int32
Position:9
Default value:0
Accept pipeline input:False
Accept wildcard characters:False