Publish-NAVApp

Publishes an Extension to the app catalog of the specified Business Central Server instance.

Syntax

Publish-NAVApp
       [-Path] <String>
       [-PassThru]
       [-SkipVerification]
       [[-PackageType] <String>]
       [[-Tenant] <TenantId>]
       [-Scope <NavAppScope>]
       [-PublisherAzureActiveDirectoryTenantId <Guid>]
       [-Force]
       [<CommonParameters>]
Publish-NAVApp
       [-ServerInstance] <String>
       [-Path] <String>
       [-PassThru]
       [-SkipVerification]
       [[-PackageType] <String>]
       [[-Tenant] <TenantId>]
       [-Scope <NavAppScope>]
       [-PublisherAzureActiveDirectoryTenantId <Guid>]
       [-Force]
       [<CommonParameters>]

Description

Use the Publish-NAVApp cmdlet to publish an Extension from a package file (.app) to the app catalog of the specified Business Central Server instance. Once published, you can install the Extension for individual tenants.

If you have deployed your NAV database to Azure SQL Database, you will need to create a new database to use as the sandbox for completing the publishing process. Use the SandboxDatabaseName, SandboxDatabaseServer, and SandboxDatabaseCredentials parameters to specify the connection information for the database to use as the sandbox.

Examples

EXAMPLE 1

Publish-NAVApp -ServerInstance DynamicsNAV91 -Path '.\Proseware SmartApp.app'

This example publishes the Extension from the Proseware SmartApp.app package to the DynamicsNAV91 server instance.

EXAMPLE 2

Publish-NAVApp -ServerInstance DynamicsNAV91 -Path '.\Proseware SmartApp.app' -PassThru

          Name                  Publisher              Version                   ServerInstance
          ----                  ---------              -------                   --------------
          Proseware SmartApp    Proseware, Inc.        2.3.4.500                 DynamicsNAV90

This example publishes the Extension from the Proseware SmartApp.app package to the DynamicsNAV91 server instance and then returns an Extension object.

EXAMPLE 3

Publish-NAVApp -ServerInstance DynamicsNAV91 -Path '.\Proseware SmartApp.app' -SandboxDatabaseName DynamicsNAV90_Sandbox -SandboxDatabaseServer NAV_SQLServer -SandboxDatabaseCredentials (Get-Credential)

This example publishes the Extension from the Proseware SmartApp.app package to the DynamicsNAV91 server instance by using the DynamicsNAV90_Sandbox database on the NAV_SQLServer in Azure as a sandbox. All data within the DynamicsNAV91_Sandbox database will be overwritten.

EXAMPLE 4

Publish-NAVApp -ServerInstance DynamicsNAV91 -Path '.\System.app' -PackageType SymbolsOnly

This example publishes the Symbols package to the DynamicsNAV91 server instance. Use the SymbolsOnly switch to package Microsoft provided symbol packages only, and not regular packages. The SymbolsOnly works for Extensions V2.0 only.

Parameters

-Force

Forces the command to run without asking for user confirmation about the data in the provided sandbox database being overwritten.

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

-PackageType

Specifies the Extension Package type that you want to publish to the Business Central Server instance.

Type:String
Position:246943
Default value:Extension
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Returns an Extension object for the published Extension. The Extension object contains the properties of the Extension, such as name, publisher, version.

Type:SwitchParameter
Position:21
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Path

Specifies the path to the Extension Package file that you want to publish to the Business Central Server instance.

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

-PublisherAzureActiveDirectoryTenantId

Specifies the Microsoft Entra tenant ID of the publisher of this extension. This is used, for example, to block attempts in AL to read secrets from another publisher's key vault. For more information, see Using Key Vault Secrets in Business Central Extensions.

Type:Guid
Position:Named
Default value:00000000-0000-0000-0000-000000000000
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Scope

Specifies the scope into which the specified extension is to be published.

Global: The extension is published for all tenants on the server.

Tenant: The extension is published into the per-tenant scope. To be usable by a tenant, it must also be published to that tenant.

Possible values: Global, Tenant

Type:NavAppScope
Accepted values:Global, Tenant
Position:Named
Default value:Global
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ServerInstance

Specifies the Business Central server instance that the Extension will be published to, such as DynamicsNAV91.

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

-SkipVerification

Forces the command to run without verifying the authenticode signature.

Type:SwitchParameter
Position:246942
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Tenant

Specifies the tenant to publish the package to if it is being published into the tenant scope.

Note

In order to receive a signal for telemetry during a publish (or unpublish) operation, the -Tenant parameter must be set explicitly to the specific tenant or default.

Type:TenantId
Aliases:TenantId
Position:246944
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

By value and by property name: ServerInstance

System.String

By value and by property name: Path

Microsoft.Dynamics.Nav.Types.Apps.NavAppScope

By property name: Scope

System.Guid

By property name: PublisherAzureActiveDirectoryTenantId