New-NAVCompany

Creates a new Business Central company in the specified database.

Syntax

New-NAVCompany
   [-Tenant <TenantId>]
   [-CompanyName] <String>
   [-EvaluationCompany]
   [[-CompanyDisplayName] <String>]
   [-ServerInstance] <String>
   [-Force]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Use the New-NAVCompany cmdlet to create a new company in a Business Central database. The company that the New-NAVCompany cmdlet creates is empty. To create a company that includes the data from an existing company, use the Copy-NAVCompany cmdlet.

Examples

EXAMPLE 1

New-NAVCompany -ServerInstance BC -Tenant CRONUS -CompanyName 'CRONUS Subsidiary'

This example creates the company CRONUS Subsidiary in the CRONUS tenant database, which is mounted against the BC server instance.

Parameters

-CompanyDisplayName

Specifies a name that can be displayed for the company in the application (UI) instead of the name specified by the -CompanyName parameter.

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

-CompanyName

Specifies the name of the company that you want to create. If a company with that name already exists in the Business Central database, the cmdlet fails.

Type:String
Position:1
Default value:None
Required:True
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

-EvaluationCompany

Specifies whether the company that you want to create is an evaluation company. This parameter is only relevant for Business Central online; it does not apply to on-premise deployments.

Type:SwitchParameter
Position:2
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

-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

-Tenant

Specifies the ID of the tenant that the company must be created in, such as Tenant1. This parameter is required unless the specified service instance is not configured to run multiple tenants.

Type:TenantId
Aliases:Id
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

Notes

Because cmdlets do not execute application code, if there is any logic on application objects that are associated with creating or modifying companies from the client, be aware that the logic will not be executed when you run the cmdlet.