Friday, January 9, 2015

Web Part Deployment using PowerShell

Web Part Deployment PowerShell Script:

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { 
        Add-PSSnapin "Microsoft.SharePoint.PowerShell" 
    } 

Add-SPSolution -LiteralPath C:\WebPartName.wsp

Install-SPSolution –Identity WebPartName.wsp –GACDeployment -CompatibilityLevel 15

Enable-SPFeature -identity "FeatureName" -URL http://test.com

No comments:

Post a Comment