New-NAVServerConfiguration

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

Syntax

New-NAVServerConfiguration
   [[-ServerInstance] <String>]
   [-Force]
   [-ProgressAction <ActionPreference>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-NAVServerConfiguration
   [[-ServerInstance] <String>]
   [-ServerSettingsDocument <XmlNode>]
   [-Force]
   [-ProgressAction <ActionPreference>]
   [-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.

Type:SwitchParameter
Aliases:cf
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

-ProgressAction

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

Type:ActionPreference
Aliases:proga
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.

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.

Type:String
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters: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.

Type:XmlNode
Position:Named
Default value:None
Required:False
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

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.