Share via


New-NAVServerConfiguration

Creates a new configuration with default values, or to replace the existing configuration for a Business Central Server instance.

Syntax

DefaultServerSettingsDocument (Default)

New-NAVServerConfiguration
    [[-ServerInstance] <String>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

NewServerSettingsDocument

New-NAVServerConfiguration
    [[-ServerInstance] <String>]
    [-ServerSettingsDocument <XmlNode>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Use the New-NAVServerConfiguration cmdlet to create a new configuration with default values, or to replace the existing configuration for a Business Central Server instance. Use the New-NAVServerConfiguration cmdlet without arguments to create a new configuration with default values.

The cmdlet returns an XML document that contains default configuration settings for a Business Central Server instance.

Use New-NAVServerConfiguration with the -ServerInstance and -ServerSettingsDocument parameters to replace the existing configuration for a Business Central Server instance.

Examples

EXAMPLE 1

Get-NAVServerConfiguration bc -AsXml | New-NAVServerConfiguration myinstance

In this example, the New-NAVServerConfiguration cmdlet configures the instance myinstance to the same settings as the instance bc.

Parameters

-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

-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

-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.

If you specify a Business Central Server instance, the configuration replaces the current configuration for that instance. A new CustomSettings.config file is created in the service directory for the instance, overwriting any existing CustomSettings.config file.

Parameter properties

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

Parameter sets

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

-ServerSettingsDocument

Specifies the Business Central Server instance configuration document in XML format. You cannot specify a ServerSettingsDocument unless you also specify a ServerInstance. For more information, see Example 2.

Parameter properties

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

Parameter sets

NewServerSettingsDocument
Position:Named
Mandatory:False
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

None or System.String

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

Outputs

System.Xml.XmlDocument

Returns the configuration information as an XML document.