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 

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


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

Click here for detailed article

Run Execution Command

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


.\ApplyDesignPackageInstalltionAndUpgradeWSP.ps1 -User -SiteURL "" -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#