New-NAVCompany

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

Syntax

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

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.

Examples

EXAMPLE 1

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

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

Parameters

-CompanyName

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.

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.

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 Dynamics NAV Server instance, for example, DynamicsNAV 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.