Share via


Uninstall-NAVApp

Uninstall a Business Central app for a tenant.

Syntax

Properties (Default)

Uninstall-NAVApp
    [-ServerInstance] <String>
    [-AppId <Guid>]
    [-Name <String>]
    [-Publisher <String>]
    [-Version <Version>]
    [-Tenant <TenantId>]
    [-PassThru]
    [-DoNotSaveData]
    [-ExclusiveAccessTicket <String>]
    [-ClearSchema]
    [-Force]
    [<CommonParameters>]

Path

Uninstall-NAVApp
    [-ServerInstance] <String>
    -Path <String>
    [-Tenant <TenantId>]
    [-PassThru]
    [-DoNotSaveData]
    [-ExclusiveAccessTicket <String>]
    [-ClearSchema]
    [-Force]
    [<CommonParameters>]

Description

Use the Uninstall-NAVApp cmdlet to uninstall a Business Central app for one or more tenants.

You can't uninstall an app if it has any dependent apps installed. This cmdlet will also uninstall any dependent apps. If there are any dependent apps, you'll be prompted and asked whether you want to continue.

Examples

EXAMPLE 1

Uninstall-NAVApp -ServerInstance BC -Name 'Proseware SmartApp' -Version 2.3.4.500 -Tenant 'Tenant1'

This example uninstalls the Business Central app with the provided name and version for the tenant with the ID Tenant1. If the Business Central app contains a schema change, the tenant database will be synchronized. For V2 extensions, the Uninstall-NAVApp cmdlet does not handle synchronization, and in this case, the Sync-NAVApp cmdlet must be used.

EXAMPLE 2

Get-NAVAppInfo -ServerInstance BC -Name 'Proseware SmartApp' -Version 2.3.4.500 | Uninstall-NAVApp -Tenant 'Tenant1'

This example uninstalls the Business Central app returned from the Get-NAVAppInfo cmdlet for the tenant with the ID Tenant1. If the Business Central app contains a schema change, the tenant database will be synchronized. For V2 extensions, the Uninstall-NAVApp cmdlet does not handle synchronization, and in this case, the Sync-NAVApp cmdlet must be used.

EXAMPLE 3

Uninstall-NAVApp -ServerInstance BC -Path '.\Proseware SmartApp.app' -Tenant 'Tenant1'

This example uninstalls the Business Central app at the provided path for the tenant with the ID Tenant1. If the Business Central app contains a schema change, the tenant database will be synchronized. For V2 extensions, the Uninstall-NAVApp cmdlet does not handle synchronization, and in this case, the Sync-NAVApp cmdlet must be used.

EXAMPLE 4

Get-NAVAppInfo -ServerInstance BC -Tenant 'Tenant1' | Uninstall-NAVApp -Tenant 'Tenant1'

This example uninstalls all of the Business Central apps that have been installed for the tenant with the ID Tenant1. If the Business Central app contains a schema change, the tenant database will be synchronized. For V2 extensions, the Uninstall-NAVApp cmdlet does not handle synchronization, and in this case, the Sync-NAVApp cmdlet must be used.

EXAMPLE 5

Uninstall-NAVApp -ServerInstance BC -Name 'Proseware SmartApp' -Version 2.3.4.500 -Tenant 'Tenant1' -DoNotSaveData

This example uninstalls the Business Central app with the provided name and version for the tenant with the ID Tenant1. If the Business Central app contains a schema change, the tenant database will be synchronized but since the DoNotSaveData switch was used any data in the Business Central app fields being removed will not be saved. For V2 extensions, the Uninstall-NAVApp cmdlet does not handle synchronization, and in this case, the Sync-NAVApp cmdlet must be used.

EXAMPLE 6

Uninstall-NAVApp -ServerInstance BC -Name 'Proseware SmartApp' -Version 2.3.4.500

This example uninstalls the Business Central app with the provided name and version for a non-multitenant Business Central Server instance. If the Business Central app contains a schema change, the tenant database will be synchronized. For V2 extensions, the Uninstall-NAVApp cmdlet does not handle synchronization, and in this case, the Sync-NAVApp cmdlet must be used.

Example 7

Uninstall-NAVApp -ServerInstance BusinessCentral -Name 'Proseware SmartApp' -Version 2.3.4.500 -Tenant 'Tenant1' -ClearSchema

This example uninstalls and clears the schema and all data for the Business Central App with the provided name and version for the tenant with the ID Tenant1.

Parameters

-AppId

Specifies the ID of the Business Central App to be uninstalled.

Parameter properties

Type:Guid
Default value:00000000-0000-0000-0000-000000000000
Supports wildcards:False
DontShow:False

Parameter sets

Properties
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ClearSchema

If set, the schema will be cleared as part of the uninstall operation. The database schema defined by all versions of the target NAV App will be removed from the target tenant database and all data is lost. If there are dependent apps, the schema associated with these apps will also be cleared.

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

-DoNotSaveData

Specifies that the install should be executed without saving the Business Central app data for a future install/upgrade of the Business Central app.

Parameter properties

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

-ExclusiveAccessTicket

Specifies the exclusive access ticket allowing this operation on the tenant in the exclusive access mode.

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

-Force

Forces the command to run without asking for user confirmation to uninstall Business Central apps with a dependency on the Business Central app being uninstalled.

Parameter properties

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

-Name

Specifies the name of the Business Central app to be uninstalled.

The results must return only a single Business Central app to successfully uninstall.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AppName

Parameter sets

Properties
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-PassThru

Returns a Business Central app object for the uninstalled Business Central app. The Business Central app object contains the properties of the Business Central app, such as name, publisher, version.

Parameter properties

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

-Path

Specifies the path to a Business Central app Package file that you want to uninstall for the tenant. The Business Central app must have already been published to the server instance before uninstalling it for the tenant.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Path
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Publisher

Specifies the publisher of the Business Central app to be uninstalled.

The results must return only a single Business Central app to successfully uninstall.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AppPublisher

Parameter sets

Properties
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ServerInstance

Specifies the Business Central Server instance that the Business Central app is published to, such as BC.

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 you want to uninstall the Business Central app for, such as Tenant1.

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

-Version

Specifies the version of the Business Central app to be uninstalled.

The results must return only a single Business Central app to successfully uninstall.

Parameter properties

Type:Version
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AppVersion

Parameter sets

Properties
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
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

System.String

By value and by property name: ServerInstance

System.String

By property name: Name

System.String

By property name: Publisher

System.Version

By property name: Version

Microsoft.Dynamics.Nav.Types.TenantId

By property name: Tenant

System.String

By property name: Path

System.String

By value and by property name: ExclusiveAccessTicket