Get-NAVServerConfiguration

Returns configuration settings for the specified Business Central Server instance.

Syntax

Get-NAVServerConfiguration
   [-ServerInstance] <String>
   [[-KeyName] <String>]
   [-InMemory]
   [-AsXml]
   [-IgnoreSettingsWithDefaultValues]
   [-Force]
   [-ProgressAction <ActionPreference>]
   [<CommonParameters>]

Description

Use the Get-NAVServerConfiguration cmdlet to return configuration settings for the specified Business Central Server instance.

Examples

EXAMPLE 1

Get-NAVServerConfiguration MyInstance

This example returns configuration details for the Business Central Server instance server named MyInstance on the Business Central Server computer.

EXAMPLE 2

(Get-NAVServerConfiguration MyInstance -AsXml).configuration.appSettings | fc

class XmlElement
{
add =
[
class XmlElement
{
key = NetworkProtocol
value = Default
}
class XmlElement
{
key = DatabaseServer
value = DB112
}
class XmlElement
{
key = DatabaseInstance
value = NAVDEMO
}
class XmlElement
{
key = DatabaseName
value = My Database
}
...
]

}

This example returns configuration details for the Business Central Server instance named MyInstance on the Business Central Server computer in XML format.

EXAMPLE 3

Get-NAVServerConfiguration MyInstance -AsXml | fc

class XmlDocument
{
xml = version="1.0" encoding="utf-8"
configuration =
class XmlElement
{
configSections =
class XmlElement
{
section =
class XmlElement
{
name = uri
type = System.Configuration.UriSection, System, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089
}
}
appSettings =
class XmlElement
{
add =
[
class XmlElement
{
key = NetworkProtocol
value = Default
}
class XmlElement
{
key = DatabaseServer
value = DB112
}
class XmlElement
{
key = DatabaseInstance
value = NAVDEMO
}
class XmlElement
{
key = DatabaseName
value = My Database
}
...
]

}
system.diagnostics =
class XmlElement
{
assert =
class XmlElement
{
assertuienabled = false
}
}
uri =
class XmlElement
{
schemeSettings =
class XmlElement
{
add =
[
class XmlElement
{
name = http
genericUriParserOptions = DontUnescapePathDotsAndSlashes
}
class XmlElement
{
name = https
genericUriParserOptions = DontUnescapePathDotsAndSlashes
}
]

}
}
system.net =
class XmlElement
{
settings =
class XmlElement
{
httpListener =
class XmlElement
{
unescapeRequestUrl = false
}
}
}
runtime =
class XmlElement
{
gcConcurrent =
class XmlElement
{
enabled = false
}
gcServer =
class XmlElement
{
enabled = true
}
}
}
}

This example returns an XML document that contains the details for the Business Central Server instance named MyInstance on the Business Central Server computer.

Parameters

-AsXml

Formats the cmdlet output as an XML document.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:True
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

-IgnoreSettingsWithDefaultValues

Omits settings that are assigned the default value. This parameter is ignored if the -AsXml parameter is used.

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

-InMemory

Returns setting values that are in the server instance's memory, rather than in the configuration file.

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

-KeyName

Get the value for a specific key.

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

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

Inputs

System.String

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

Outputs

System.Xml.XPathNodeList

Returns the configuration settings as well-formatted text.

System.Xml.XmlDocument

If you use the AsXml parameter, then the cmdlet returns the configuration settings as an XML document.