New-NAVCompany

New-NAVCompany

Creates a new Microsoft Dynamics NAV company in the specified database.

Syntax

Parameter Set: __AllParameterSets
New-NAVCompany [-ServerInstance] <String> [-CompanyName] <String> [-Force] [-Tenant <TenantId> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

Use the New-NAVCompany cmdlet to create a new company in a Microsoft Dynamics NAV 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.

Parameters

-CompanyName<String>

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

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServerInstance<String>

Specifies the Microsoft Dynamics NAV Server instance that the company uses, such as DynamicsNAV71. You can specify either the fully qualified name, such as 'MyServer$DynamicsNAV71', or the short name, such as 'DynamicsNAV71'.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Tenant<TenantId>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

--------------------------EXAMPLE 1--------------------------

Description

-----------

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

PS C:\> New-NAVCompany -ServerInstance DynamicsNAV71 -Tenant CRONUS -CompanyName 'CRONUS Subsidiary'