Sharepoint Powershell commands:

Sitecollection Backup and Resore

Backup site collection:
Backup-spsite <site url> -path c:\samp\pol.bak

Restore site collection:
Restore-spsite <site url> -path c:\samp\pol.bak  

(use new blank page to restore other wise type -force)

Web Backup and Restore

Backup web:
Import-spweb <site url> -path c:\path

Restore web:
Export-spweb <site url> -path c:\path

Restore toplevel site to subsite

Export :       stsadm -o export -url <fullurl which u want to export> -filename <location:filename.dat>

Import :         stsadm -o import -url <destination url> -filename <location where u stored.dat file>

Feature and solution installation

(first copy the wsp file from documents ms sharepoint 2010 to target computer c drive)
Install solution:
     Add-spsolution c:\solutionFile.wsp

    Install-spsolution -identity solutionFile.wsp -webapplication <site url> -Gacdeployment -force

(check in site actions->site settings->Site Collection Administration->Site collection features->activate the webpart )


Uninstall solution:
Uninstall-SPSolution –Identity solutionFile.wsp –WebApplication <site url>

Remove-SPSolution –Identity solutionFile.wsp 

Update solution:
If you have updated just your logic (code) and only need to update your DLL
Update-SPSolution –Identity YourSolutionName.wsp –LiteralPath “C:\YourSolutionName.wsp” –GacDeployment

Comments

Popular posts from this blog

Upload Single/Multiple file by using the REST API and jQuery SharePoint 2013

Add content type to SharePoint List/Library using REST API

A type named 'SP.Data. could not be resolved by the model error