Set-NAVServerConfiguration
Configures settings for a Business Central Server instance.
Syntax
KeyValuePairSettings (Default)
Set-NAVServerConfiguration
[-ServerInstance] <String>
-KeyName <String>
[-KeyValue <String>]
[-Element <String>]
[-ApplyTo <SetConfigMode>]
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
DatabaseCredentials
Set-NAVServerConfiguration
[-ServerInstance] <String>
-DatabaseCredentials <PSCredential>
[-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
Parameter properties
Type: | SetConfigMode |
Default value: | ConfigFile |
Accepted values: | ConfigFile, Memory, All |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
KeyValuePairSettings
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Confirm
Prompts you for confirmation before executing the command.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | PSCredential |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
DatabaseCredentials
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Element
Specifies the navigation path from the root element to the appSettings section of the configuration document.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
KeyValuePairSettings
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Force
Forces the command to run without asking for user confirmation.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-KeyName
The configuration key name. Examine the CustomSettings.config file to determine the correct key name.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
KeyValuePairSettings
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
KeyValuePairSettings
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
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.
Inputs
System.String
You can pipe a string that contains a Business Central Server instance name to the cmdlet.