Set-NAVCompany

Changes properties of a Business Central company.

Syntax

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.

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

-CompanyName

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

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

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 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.

Type:TenantId
Aliases:Id
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

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