Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Remove-NAVCompany
Removes a company from a Business Central database.
Syntax
Default (Default)
Remove-NAVCompany
[-Tenant <TenantId>]
[-CompanyName] <String>
[-ForceImmediateDataDeletion]
[-ServerInstance] <String>
[-Force]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Use the Remove-NAVCompany cmdlet to remove a company from the specified tenant database. When you remove a company, the company and all of the data that it contains will be deleted. We recommend that you make a backup before you remove a company. You must also make sure that you are the only active user for the company before you remove the company.
Examples
EXAMPLE 1
Remove-NAVCompany -ServerInstance BC -Tenant CRONUS -CompanyName 'CRONUS International Ltd.'
This example removes the CRONUS International Ltd. company from the database that has the tenant ID CRONUS and which is mounted against the BC server instance.
Parameters
-CompanyName
Specifies the name of the company that you want to delete. If the company does not exist in the Business Central database, the operation fails.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
-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
-ForceImmediateDataDeletion
Specifies to delete all company data immediately.
This parameter only applies when the Business Central Server instance is configured to delete companies incrementally, which is done by setting the UseIncrementalCompanyDelete configuration key to 'true'. In this case, the company data is not deleted immediately but is done later by task scheduler. You use this parameter to override the UseIncrementalCompanyDelete configuration setting.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ProgressAction
A common PowerShell parameter that determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider. Learn more.
Parameter properties
| Type: | ActionPreference |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | proga |
Parameter sets
-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
-Tenant
Specifies the ID of the tenant that the company is stored 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
-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
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.
Related Links
Feedback
Was this page helpful?
