Share via


Set-NAVCompany

Changes properties of a Business Central company.

Syntax

Default (Default)

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

Description

Use the Set-NAVCompany cmdlet to change properties of a company in a Business Central database.

Examples

EXAMPLE 1

Set-NAVCompany -ServerInstance BusinessCentral -CompanyName 'CRONUS International Ltd.' -Tenant CRONUS -CompanyDisplayName 'CRONUS'

This example sets the display name of the company 'CRONUS International Ltd.' to 'CRONUS.'. The company already exists in tenant database 'CRONUS', which is mounted against the server instance 'BusinessCentral'.

Parameters

-CompanyDisplayName

Specifies the new display name of the company.

Parameter properties

Type:String
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:True
Value from remaining arguments:False

-CompanyName

Specifies the name of the company that you want to modify.

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 running the cmdlet.

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

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:False
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, BusinessCentral or myinstance. You can specify either the full name of an instance, such as BusinessCentralServer$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 contains the company to be modified, such as Tenant1 or Tenant2. 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

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

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.

Inputs

Microsoft.Dynamics.Nav.Types.TenantId

By property name: Tenant

System.String

By property name: CompanyName

System.String

By property name: NewCompanyName

System.String

ServerInstance