Set-NAVServerConfiguration

Configures settings for a Business Central Server instance.

Syntax

Set-NAVServerConfiguration
   -KeyName <String>
   [-KeyValue <String>]
   [-Element <String>]
   [-ApplyTo <SetConfigMode>]
   [-ServerInstance] <String>
   [-Force]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-NAVServerConfiguration
   -DatabaseCredentials <PSCredential>
   [-ServerInstance] <String>
   [-Force]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Use the Set-NAVServerConfiguration cmdlet to configure settings for a Business Central Server instance. Values are written directly to the configuration file for the instance (CustomSettings.config). New setting values do not take effect until you restart the server instance.

Examples

EXAMPLE 1

Set-NAVServerConfiguration MyInstance -KeyName DatabaseServer -KeyValue DatabaseServer.Domain.Com

In this example, the Set-NAVServerConfiguration cmdlet sets the value for the 'DatabaseServer' key to 'DatabaseServer.Domain.Com' for a Business Central Server instance, MyInstance.

Parameters

-ApplyTo

Specifies where to apply the configuration change that is specified by the cmdlet. You can specify the parameter value by name or by integer according to the following:

ConfigFile or 0: Saves the change to the configuration file of the server instance. The change will not take effect until the server instance is restarted.

Memory or 1: The setting change is just applied to the server instance's current setting state. This is only applicable for server settings which support dynamic updating. If the specified setting is not dynamically updateable this command will fail.

All or 2: Applies the change to the server instance's current setting state (in memory) and to the configuration file. This is only applicable for server settings that support dynamic updating. If the setting does not support dynamic updating, the cmdlet will fail with an error. The change will not be applied to the current session or the configuration file.

Possible values: ConfigFile, Memory, All

Type:SetConfigMode
Accepted values:ConfigFile, Memory, All
Position:Named
Default value:ConfigFile
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before executing the command.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DatabaseCredentials

The user name and password of the login account that the Business Central Server instance will use to connect to the Business Central database in SQL Server. This parameter is configures the Business Central Server instance to use SQL Server Authentication instead of Windows Authentication on the connection to the database. The login account must be a member of the db_owner role on the database.

Type:PSCredential
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Element

Specifies the navigation path from the root element to the appSettings section of the configuration document.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-KeyName

The configuration key name. Examine the CustomSettings.config file to determine the correct key name.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-KeyValue

The configuration key value. For more information about supported values, see Configuring Business Central Server in the Business Central Developer and IT Pro Help.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ServerInstance

Specifies the name of a Business Central Server instance, for example, BC or myinstance. You can specify either the full name of an instance, such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

You can pipe a string that contains a Business Central Server instance name to the cmdlet.

Outputs

None