New-NAVServerConfiguration

Creates a new configuration with default values, or to replace the existing configuration for a Microsoft Dynamics NAV Server instance.

Syntax

New-NAVServerConfiguration
   [[-ServerInstance] <String>]
   [-Force]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
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 Microsoft Dynamics NAV 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 Microsoft Dynamics NAV Server instance.

Use New-NAVServerConfiguration with the -ServerInstance and -ServerSettingsDocument parameters to replace the existing configuration for a Microsoft Dynamics NAV Server instance.

Examples

EXAMPLE 1

Get-NAVServerConfiguration dynamicsnav -AsXml | New-NAVServerConfiguration myinstance

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

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

-ServerInstance

Specifies the name of a Dynamics NAV Server instance, for example, DynamicsNAV 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 Dynamics NAV 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 Dynamics NAV 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 Microsoft Dynamics NAV Server instance name or the Microsoft Dynamics NAV Server instance configuration XML document to the cmdlet.

Outputs

System.Xml.XmlDocument

Returns the configuration information as an XML document.