Share via


Set-NAVWebServerInstanceConfiguration

Changes a configuration value for a Business Central Web Server instance.

Syntax

Default (Default)

Set-NAVWebServerInstanceConfiguration
    [-WebServerInstance] <String>
    [-KeyName] <String>
    [-KeyValue] <String>
    [[-SiteDeploymentType] <String>]
    [[-ContainerSiteName] <String>]
    [-ProgressAction <ActionPreference>]
    [<CommonParameters>]

Description

Each web server instance has a configuration file called the navsettings.json file, which is stored in the physical path of the web server instance. This file contains several key-value pairs that configure various settings. The key-value pairs have the format 'KeyName': 'KeyValue', such as 'ClientServicesCredentialType': 'Windows'. You can use this cmdlet to change the value of any key in the configuration file. The changes will be applied to the web server instance automatically because the application pool is recycled. When the application pool is recycled by the IIS, static state such as client sessions in the Business Central Web client will be lost.

Examples

EXAMPLE 1

Set-NAVWebServerInstanceConfiguration -WebServerInstance BC -KeyName ClientServicesCredentialType -KeyValue NavUserPassword

This example sets the 'ClientServicesCredentialType' configuration setting to 'NavUserNamePassword'.

Parameters

-ContainerSiteName

Specifies the name of the container website that the SubSite-type web server instance belongs to. This setting is only used if SiteDeploymentType has been set to 'SubSite'. If the subsite is under the default container website 'Business Central [Version] Web Client' then you can omit this parameter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:5
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-KeyName

Specifies the configuration key name as it appears in the web server instance's configuration file (navsettings.json).

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-KeyValue

Specifies configuration key value.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProgressAction

A common PowerShell parameter that determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider. Learn more.

Parameter properties

Type:ActionPreference
Default value:None
Supports wildcards:False
DontShow:False
Aliases:proga

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SiteDeploymentType

Specifies the deployment type of web server instance. There are two possible values: SubSite and RootSite.

  • Use SubSite if the web server instance was created as a subsite (web application) to a container website. If you specify SubSite, you will have to set the -ContainerSiteName parameter. If the subsite is under the default container website 'Business Central [Version] Web Client' then you can omit this parameter.
  • RootSite if the web server instance was created as a root-level website.

Parameter properties

Type:String
Default value:SubSite
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:4
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WebServerInstance

Specifies the name of the web server instance in IIS.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.