Skip to content

Latest commit

 

History

History
165 lines (130 loc) · 3.79 KB

Add-PnPApp.md

File metadata and controls

165 lines (130 loc) · 3.79 KB
Module Name schema applicable online version external help file title
PnP.PowerShell
2.0.0
SharePoint Online
PnP.PowerShell.dll-Help.xml
Add-PnPApp

Add-PnPApp

SYNOPSIS

Add/uploads an available app to the app catalog

SYNTAX

Add-PnPApp [-Path] <String> [-Scope <AppCatalogScope>] [-Overwrite] [-Timeout <Int32>] [-Publish [-SkipFeatureDeployment]] [-Connection <PnPConnection>] [-Force <SwitchParameter>]

DESCRIPTION

Allows to upload an app to the app catalog at tenant or site collection level. By specifying -Publish option it is possible to deploy/trust it at the same time.

EXAMPLES

EXAMPLE 1

Add-PnPApp -Path ./myapp.sppkg

This will upload the specified app package to the tenant app catalog

EXAMPLE 2

Add-PnPApp -Path ./myapp.sppkg -Publish

This will upload the specified app package to the tenant app catalog and deploy/trust it at the same time.

EXAMPLE 3

Add-PnPApp -Path ./myapp.sppkg -Scope Site -Publish

This will upload the specified app package to the site collection app catalog and deploy/trust it at the same time.

EXAMPLE 4

Add-PnPApp -Path ./myapp.sppkg -Publish -SkipFeatureDeployment

This will upload the specified app package to the tenant app catalog, deploy/trust it and make it globally available on all site collections.

PARAMETERS

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite

When provided, it will overwrite the existing app package if it already exists

Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path

The path to the app package to deploy to the App Catalog

Type: String
Parameter Sets: (All)
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Publish

This will deploy/trust an app into the App Catalog

Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope

Defines which app catalog to use: the site collection scoped App Catalog or the tenant wide App Catalog. Defaults to Tenant.

Type: AppCatalogScope
Parameter Sets: (All)
Accepted values: Tenant, Site
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipFeatureDeployment

When provided, the solution will be globally deployed, meaning one does not have to go into every site to add it as an app to have its components available. Instead they will be available rightaway.

Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Timeout

Specifies the timeout in seconds. Defaults to 200.

Type: Int32
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

If provided, no confirmation will be asked to change no-script setting.

Type: SwitchParameter
Parameter Sets: (All)

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

RELATED LINKS

Microsoft 365 Patterns and Practices