Uninstall-NAVApp

Uninstall-NAVApp

Uninstalls a Microsoft Dynamics NAV extension for the specified tenant.

Syntax

Parameter Set: Path
Uninstall-NAVApp [-ServerInstance] <String> -Path <String> [-DoNotSaveData] [-Force] [-PassThru] [-Tenant <TenantId> ] [ <CommonParameters>]

Parameter Set: Properties
Uninstall-NAVApp [-ServerInstance] <String> -Name <String> [-DoNotSaveData] [-Force] [-PassThru] [-Publisher <String> ] [-Tenant <TenantId> ] [-Version <Version> ] [ <CommonParameters>]

Detailed Description

Use the Uninstall-NAVApp cmdlet to remove an extension for one or more tenants in a multitenant deployment of Microsoft Dynamics NAV.

If other extensions have a dependency on the specified extension, you must specify if they must also be uninstalled. Set the Force parameter to automatically remove dependent extensions.

Parameters

-DoNotSaveData

Specifies that the installation must run without saving any data that may have been stored by the functionality in the extension.

When an extension is uninstalled, data can be saved and then imported when the extension is installed again. Set this parameter if you do not want to save data from this installation for future use.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the extension that you want to uninstall.

The results must return only a single extension; otherwise the cmdlet fails.

Aliases

AppName

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. The object contains the properties of the extension, such as name, publisher, and version.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Specifies the path to an extension package file that you want to uninstall for the tenant. The extension must have already been published to the server instance and installed for the specified tenant; otherwise you cannot uninstall it.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Publisher<String>

Specifies the publisher of the extension that you want to uninstall. The results must return only a single extension; otherwise the cmdlet fails.

Aliases

AppPublisher

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-ServerInstance<String>

Specifies the Microsoft Dynamics NAV Server instance that the extension is published to, such as DynamicsNAV90.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Tenant<TenantId>

Specifies the ID of the tenant that you want to uninstall the extension for, such as Tenant1.

Aliases

Id

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Version<Version>

Specifies the version of the extension that you want to uninstall. The results must return only a single extension; otherwise the cmdlet fails.

Aliases

AppVersion

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This example uninstalls the specified version of the specified extension for the tenant with the ID Tenant1. If the extension contains a schema change, the tenant database is synchronized.

PS C:\> Uninstall-NAVApp -ServerInstance DynamicsNAV90 -Name 'Proseware SmartStuff' -Version 2.3.4.500 -Tenant 'Tenant1'

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

This example uninstalls the extension that is returned by the Get-NAVAppInfo cmdlet for the tenant with the ID Tenant1. If the extension contains a schema change, the tenant database is synchronized.

PS C:\> Get-NAVAppInfo -ServerInstance DynamicsNAV90 -Name 'Proseware SmartStuff' -Version 2.3.4.500 | Uninstall-NAVApp -Tenant 'Tenant1'

-------------------------- EXAMPLE 3 --------------------------

Description

-----------

This example uninstalls the extension at the provided path for the tenant with the ID Tenant1. If the extension contains a schema change, the tenant database is synchronized.

PS C:\> Uninstall-NAVApp -ServerInstance DynamicsNAV90 -Path '.\Proseware SmartStuff.navx' -Tenant 'Tenant1'

-------------------------- EXAMPLE 4 --------------------------

Description

-----------

This example uninstalls all extensions that have been installed for the tenant with the ID Tenant1. If an extension contains a schema change, the tenant database is synchronized.

PS C:\> Get-NAVAppInfo -ServerInstance DynamicsNAV90 -Tenant 'Tenant1' | Uninstall-NAVApp -Tenant 'Tenant1'

-------------------------- EXAMPLE 5 --------------------------

Description

-----------

This example uninstalls the specified extension for the tenant with the ID Tenant1. If the extension contains a schema change, the tenant database is synchronized. However, by setting the DoNotSaveData parameter, any data in the fields that the extension contained will not be saved.

PS C:\> Uninstall-NAVApp -ServerInstance DynamicsNAV90 -Name 'Proseware SmartStuff' -Version 2.3.4.500 -Tenant 'Tenant1' -DoNotSaveData

-------------------------- EXAMPLE 6 --------------------------

Description

-----------

This example uninstalls the specified extension in a non-multitenant Microsoft Dynamics NAV deployment. If the extension contains a schema change, the tenant database is synchronized.

PS C:\> Uninstall-NAVApp -ServerInstance DynamicsNAV90 -Name 'Proseware SmartStuff' -Version 2.3.4.500

Extending Microsoft Dynamics NAV Using Extension Packages