Share via


New-NAVCompany

Creates a new Business Central company in the specified database.

Syntax

Default (Default)

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before executing the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:TenantId
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Id

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

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.