Using PowerShell Commands and deploying the WSP is very easy. I will explain Add WSP, Install WSP, Update WSP, UnInstall WSP and Remove WSP one by one in the following.
Copy your WSP file to an appropriate location e.g. C:\<foldername>
Launch Power Shell on the SharePoint server Start -> All Programs -> Microsoft SharePoint 2013 Products -> SharePoint 2013 Management Shell
Copy your WSP file to an appropriate location e.g. C:\<foldername>
Launch Power Shell on the SharePoint server Start -> All Programs -> Microsoft SharePoint 2013 Products -> SharePoint 2013 Management Shell
1. Adding SharePoint WSP package using Power Shell command:
To Add a WSP package, you must use the following PowerShell command.
Add-SPSolution “<WSP package path>”
e.g.: Add-SPSolution “C:\testfile.wsp”
More info on MSDN
2. Installing SharePoint WSP package using PowerShell command:
To Install a WSP package, you must use the following PowerShell command.
Install-SPSolution -Identity “<wsp package name>” -WebApplication “<url of web application>” -GACDeployment
e.g.: Install-SPSolution -Identity “testfile.wsp” -WebApplication “http://localhost:11111” -GACDeployment
More info on MSDN
3. Uninstalling SharePoint WSP package using PowerShell command:
To uninstall a WSP package, you must use the following PowerShell command.
Uninstall-SPSolution -Identity “<wsp package name>” -WebApplication “<url of web application>”
e.g.: Uninstall-SPSolution -Identity “testfile.wsp” -WebApplication localhost:11111”
More info on MSDN
4. Removing SharePoint WSP package using PowerShell command:
To remove a WSP package, you must use the following PowerShell command.
Remove-SPSolution -Identity “<wsp package name>”
e.g.: Remove-SPSolution -Identity “testfile.wsp”
More info on MSDN
5. Updating SharePoint WSP package using PowerShell command:
To Update a WSP package, you must use the following Powershell command.
Update-SPSolution -Identity “<wsp package name>” -LiteralPath “<physical path of the wsp package>” –GacDeployment
e.g.: Update-SPSolution -Identity “testfile.wsp” -LiteralPath “C:\testfile.wsp” -GacDeployment
More info on MSDN
Hope this article is useful.
To Add a WSP package, you must use the following PowerShell command.
Add-SPSolution “<WSP package path>”
e.g.: Add-SPSolution “C:\testfile.wsp”
More info on MSDN
2. Installing SharePoint WSP package using PowerShell command:
To Install a WSP package, you must use the following PowerShell command.
Install-SPSolution -Identity “<wsp package name>” -WebApplication “<url of web application>” -GACDeployment
e.g.: Install-SPSolution -Identity “testfile.wsp” -WebApplication “http://localhost:11111” -GACDeployment
More info on MSDN
3. Uninstalling SharePoint WSP package using PowerShell command:
To uninstall a WSP package, you must use the following PowerShell command.
Uninstall-SPSolution -Identity “<wsp package name>” -WebApplication “<url of web application>”
e.g.: Uninstall-SPSolution -Identity “testfile.wsp” -WebApplication localhost:11111”
More info on MSDN
4. Removing SharePoint WSP package using PowerShell command:
To remove a WSP package, you must use the following PowerShell command.
Remove-SPSolution -Identity “<wsp package name>”
e.g.: Remove-SPSolution -Identity “testfile.wsp”
More info on MSDN
5. Updating SharePoint WSP package using PowerShell command:
To Update a WSP package, you must use the following Powershell command.
Update-SPSolution -Identity “<wsp package name>” -LiteralPath “<physical path of the wsp package>” –GacDeployment
e.g.: Update-SPSolution -Identity “testfile.wsp” -LiteralPath “C:\testfile.wsp” -GacDeployment
More info on MSDN
Hope this article is useful.
PowerShell Commands : Add, Install, Update, UnInstall, Delete WSP in SharePoint
Reviewed by Sudheer Gangumolu
on
October 14, 2014
Rating:
No comments: