Share via


Publish-NAVApp

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

Syntax

None (Default)

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

ServerInstance

Publish-NAVApp
    [-ServerInstance] <String>
    [-Path] <String>
    [[-PackageType] <String>]
    [[-Tenant] <TenantId>]
    [-PassThru]
    [-SkipVerification]
    [-Scope <NavAppScope>]
    [-PublisherAzureActiveDirectoryTenantId <Guid>]
    [-DependencyDescription <String>]
    [-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

-DependencyDescription

DO NOT USE: This parameter is intended for Microsoft use only.

Specifies the version of each dependency of the publishing app to be used when compiling. If the parameter is used, the value must include information about every dependency, and every dependency must already be published. If not, the publishing operation will fail.

The value is stringified dictionary of the type GUID that has the format: {"<app ID 1>":{"Major":<n>,"Minor":<n>,"Build":<n>,"Revision":<n>}

Example: {"a64e94c6-2aa3-490a-9e3a-23dd047dcb72":{"Major":1,"Minor":0,"Build":0,"Revision":0}, "4dcc7853-f43a-462b-a69e-a9931341d90d": {"Major":1,"Minor":0,"Build":1,"Revision":23}}

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

-Force

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

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

-PackageType

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

Parameter properties

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

Parameter sets

(All)
Position:246943
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

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

Parameter properties

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

Parameter sets

(All)
Position:21
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Path

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

Parameter properties

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

Parameter sets

(All)
Position:20
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:00000000-0000-0000-0000-000000000000
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

-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

Parameter properties

Type:NavAppScope
Default value:Global
Accepted values:Global, Tenant
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

-ServerInstance

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

Parameter properties

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

Parameter sets

ServerInstance
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-SkipVerification

Forces the command to run without verifying the authenticode signature.

Parameter properties

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

Parameter sets

(All)
Position:246942
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:TenantId
Default value:None
Supports wildcards:False
DontShow:False
Aliases:TenantId

Parameter sets

(All)
Position:246944
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
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 value and by property name: Path

Microsoft.Dynamics.Nav.Types.Apps.NavAppScope

By property name: Scope

System.Guid

By property name: PublisherAzureActiveDirectoryTenantId