Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Sunday, March 23, 2025

SharePoint PowerShell Commands

SharePoint PowerShell Commands

Note: -

As per my knowledge the below SharePoint PowerShell commands will work below SharePoint Versions.

 

1. SharePoint 2010.

2. SharePoint 2013.

3. SharePoint 2016.

4. SharePoint 2019.

 

I don’t have any knowledge on SharePoint Server Subscription, hence not able to comment on the new version.

 

Title

SharePoint PowerShell Command Example

Command Type

Add-SPSolution

Add-SPSolution "Path\Test.wsp"

WSP

Install-SPSolution

Install-SPSolution -Identity Test.wsp -WebApplication http://SP2019Dev:100/ -GACDeployment -Force

WSP

Uninstall-SPSolution

Uninstall-SPSolution -Identity Test.wsp –WebApplication http://SP2019Dev:100/

WSP

Remove-SPSolution

Remove-SPSolution -Identity Test.wsp

WSP

Backup-SPSite

Backup-SPSite https://server_name/sites/site_name -Path C:\Backup\site_name.bak

Backup a Site Collection

Restore-SPSite

Restore-SPSite https://server_name/sites/site_name -Path C:\Backup\site_name.bak

Restore a Site Collection

Import-SPWeb

Import-SPWeb https://site -Path export.cmp -UpdateVersions Overwrite

Backup a Particular SharePoint Site/Subsite

Export-SPWeb

Export-SPWeb https://site -Path "C:\Temp\export.cmp"

Restore a Particular SharePoint Site/Subsite

 

Add-SPSolution: -

            The Add-SPSolution cmdlet adds a SharePoint solution package to the farm. This cmdlet does not deploy the uploaded SharePoint solution.

 

Install-SPSolution: -

            The Install-SPSolution cmdlet deploys an installed SharePoint solution in the farm.

 

Uninstall-SPSolution: -

            The Uninstall-SPSolution cmdlet retracts a deployed SharePoint solution in preparation for removing it from the farm entirely.

 

Remove-SPSolution: -

            The Remove-SPSolution cmdlet deletes a SharePoint solution from a farm.