PowerShell and CSOM:Tool to Import Design Package WSP for SharePoint Online O365

Introduction

O365- SharePoint Online : This tool is responsible for activating the madatory features for any site other than Publishing and Installing or Upgrading the WSP Solution.

Below are the features,

1. SharePoint Server Publishing Infrastructure

2. SharePoint Server Publishing

Download Source

Click here to download Source

You can also extend the logic for activation of other feature by calling below,

PowerShell
Enable-SPOFeature -sSiteColUrl $SiteURL -spoCtx $Context -sFeatureGuid $FeatureGuidServerPublishing -IsSiteScope $False
 Use below parameters while calling method,
$SiteURL – site collection URL
$Context – Context of the site
$sFeatureGuid – Guid of feature to be activated
$True or $False – is site collection level feature

Run Execution Command

Below is the command will be helpful to execute the tool. Kindly modify the parameters before execution,

PowerShell
.\ApplyDesignPackageInstalltionAndUpgradeWSP.ps1 -User admin@xxxxxx.onmicrosoft.com -SiteURL "https://xxxxxx.sharepoint.com/sites/xxxxxx" -wspFullFilePath "C:\Amjad\<WSPBuildName>.wsp"  -WspFileName "<WSPBuildName>.wsp" -wspPackageName "<WSPBuildName>" -majorVersion 1 -minorVersion 0

Parameters details are as below,

Script can accept 7 parameters from the command line#

# User – mandatory – Administrator login ID for the tenant we are querying

# SiteURL – mandatory – Destination Site URL for the tenant we are querying

# wspFullFilePath – mandatory – Path of WSP location to upload from

# WspFileName – mandatory – Name of WSP file

# wspPackageName – Optional – WSP Package Name for Solution Gallery

# majorVersion – Optional – majorVersion of the Build demployment or upgrade

# majorVersion – Optional – minorVersion of the Build demployment or upgrade#

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s