New-NAVServerInstance

Creates a new Business Central Server instance.

Syntax

New-NAVServerInstance
   -ManagementServicesPort <ServicePort>
   [-ClientServicesPort <ServicePort>]
   [-SOAPServicesPort <ServicePort>]
   [-ODataServicesPort <ServicePort>]
   [-DeveloperServicesPort <ServicePort>]
   [-SnapshotDebuggerServicesPort <ServicePort>]
   [-DatabaseServer <DatabaseServer>]
   [-DatabaseInstance <DatabaseInstance>]
   [-DatabaseName <DatabaseName>]
   [-Multitenant]
   [-DatabaseCredentials <PSCredential>]
   [-ClientServicesCredentialType <String>]
   [-ServicesCertificateThumbprint <ClientServicesCertificateThumbprint>]
   [-ServiceAccount <ServiceAccount>]
   [-ServiceAccountCredential <PSCredential>]
   [-ServerInstance] <String>
   [-Force]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Use the New-NAVServerInstance cmdlet to create a new Business Central Server instance. You must specify a name for the instance, in addition to values for the four port parameters. All other configuration values for the new instance are based on default values.

Make sure that you verify the DatabaseServer and DatabaseName values after the instance is created, to ensure that the instance can accept client requests. All permissions that are required for the instance to start are configured automatically.

Examples

EXAMPLE 1

New-NAVServerInstance NewInstance -ManagementServicesPort 8099 -ClientServicesPort 8100 -SOAPServicesPort 8101 -ODataServicesPort 8102 -verbose

VERBOSE: NavCommand.BeginProcessing
VERBOSE: NavCommand.ProcessRecord
VERBOSE: Creating Instance directory C:\Program Files\Business Central\130\Service\Instances\NewNAVServer
VERBOSE: Adding Windows Firewall (and UrlAcl) rules for Server Instance MicrosoftDynamicsNavServer$NewNAVServer
VERBOSE: Adding Windows Firewall (and UrlAcl) rules for Server Instance MicrosoftDynamicsNavServer$NewNAVServer
VERBOSE: Adding Windows Firewall (and UrlAcl) rules for Server Instance MicrosoftDynamicsNavServer$NewNAVServer
VERBOSE: NavCommand.EndProcessing

This example creates a new Business Central Server instance. It configures the necessary firewall exceptions and performs the necessary Access Control List registrations.

EXAMPLE 2

Get-Credential | New-NAVServerInstance NewInstance -ServiceAccount User -ManagementServicesPort 8099 -ClientServicesPort 8100 -SOAPServicesPort 8101 -ODataServicesPort 8102 -verbose

VERBOSE: NavCommand.BeginProcessing
VERBOSE: NavCommand.ProcessRecord
VERBOSE: Performing operation "New-NAVServerInstance" on Target "ServerInstance = MicrosoftDynamicsNavServer$NewInstance, DatabaseInstance = ".
VERBOSE: Creating Instance directory C:\Program Files\Microsoft BC\130\Service\Instances\NewInstance
VERBOSE: Installing Server Instance MicrosoftDynamicsNavServer$NewInstance
VERBOSE: Setting service parameter: 'ManagementServicesPort' to value: '8099'
VERBOSE: Setting service parameter: 'ClientServicesPort' to value: '8100'
VERBOSE: Setting service parameter: 'SOAPServicesPort' to value: '8101'
VERBOSE: Setting service parameter: 'ODataServicesPort' to value: '8102'
VERBOSE: NavCommand.EndProcessing

This example prompts for ServiceAccount credentials and then creates a new Business Central Server instance.

Parameters

-ClientServicesCredentialType

The type of client credential used for client authentication. Possible values are: Windows, Username, NavUserPassword and AccessControlService.

If you use the Windows credential type, then the client connects with current user. This user must be known to both the server and the client. This is the default credential type. Typically, it is used on a LAN with Active Directory. With the Windows credential type, X.509 certificates are not used.

If you use the UserName credential type, then the user must specify username/password credentials on the client. These credentials are then validated against Windows authentication by Business Central Server. There must already be a corresponding user in Windows. Security certificates are required to protect the passing of credentials across a wide-area network. This setting should typically be used when the computer on which Business Central Server is installed is part of an authenticating Active Directory domain but the computer where the client is installed is not part of the domain.

If you use the NavUserPassword credential type, then authentication is managed by Business Central Server but is not based on Windows users or Active Directory. The user is prompted for username/password credentials when they start the client. The credentials are then validated by an external mechanism. Security certificates are required to protect the passing of credentials. This mode is intended for hosted environments, for example, where Business Central is implemented in Windows Azure and the list of allowed users is maintained by Business Central and not based on Windows users.

If you use the AccessControlService credential type, then authentication is handled by Windows Azure AccessControlService (ACS) or Microsoft Entra ID for user authentication services. You can use only the security token types that are supported by ACS, namely, SAML 1.1, SAML 2.0. and SWT. With this credential setting enabled, SOAP and OData Services accept a user-mapped ServiceSecurityToken as authentication model. This credential type is used by Windows Azure Marketplace.

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

-ClientServicesPort

Specifies the listening TCP port for clients such as Business Central Windows client and Business Central Web client.

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

-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

-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 configures the Business Central Server instance to use SQL Server Authentication instead of Windows Authentication on the connection to the database. If the Business Central Server instance is configured for multitenancy, then parameter configure SQL Authentication on the connection to the application database, not the tenant database.

The login account must be a member of the db_owner role on the database.

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

-DatabaseInstance

Specifies the SQL Server instance on which the Business Central database is installed.

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

-DatabaseName

Specifies the name of the Business Central database.

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

-DatabaseServer

Specifies the name of the computer on which the SQL Server instance for the Business Central database is installed.

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

-DeveloperServicesPort

The listening HTTP port for Business Central Developer web services. Valid range: 1-65535.

Type:ServicePort
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

-ManagementServicesPort

Specifies the TCP port that is used to manage the Business Central Server instance. The Management Services port has no exceptions in the firewall, and will only be accessed from the local computer. The port is used by Windows PowerShell for access Business Central Server management data.

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

-Multitenant

Specifies the Business Central Server instance to be a multitenant instance.

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

-ODataServicesPort

Specifies the listening HTTP port for Business Central OData web services.

Type:ServicePort
Position:Named
Default value:None
Required:False
Accept pipeline input:True
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.You must use single-quotes around the instance name.

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

-ServiceAccount

Specifies the Windows-based computer account that the Business Central Server instance must use to log on. The default value is NT AUTHORITY\NETWORK SERVICE. Only NetworkService and User values are supported. This parameter accepts values from the enum System.ServiceProcess.ServiceAccount.

Type:ServiceAccount
Accepted values:LocalService, NetworkService, LocalSystem, User
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ServiceAccountCredential

Specifies a set of security credentials that you must use when configuring the service account.

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

-ServicesCertificateThumbprint

Specifies the certificate thumbprint for the x509 certificate that is going to be used for securing communication with the server.

The certificate must be stored in the local machine store and in the personal sub-store in the certificate store.

The private key of the certificate must be present and exchangeable.

The certificate must be in .pfx format, not .cer format.

The certificate can be either self-signed or issued by a trusted certification authority (CA).

When specifying a ServicesCertificateThumbprint, SOAP web services and OData web services become HTTPS.

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

-SnapshotDebuggerServicesPort

The listening HTTP port for Business Central Snapshot Debugger web services. Valid range: 1-65535.

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

-SOAPServicesPort

Specifies the listening HTTP port for Business Central SOAP web services.

Type:ServicePort
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

System.String

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

Outputs

None