Tuesday, July 24, 2012

SharePoint 2010: Powershell commands



Powershell Commands


Add-SPSolution D:\Wsps\SampleSolution.wsp

Install-SPSolution –Identity SampleSolution.wsp -GACDeployment
Install-SPSolution –Identity SampleSolution.wsp -webapplication http://site -gacdeployment -force


Update-SPSolution –Identity SampleSolution.wsp –LiteralPath d:\test.wsp –GACDeployment

uninstall-spsolution -identity SampleSolution.wsp -webapplication http://site -confirm:$false

remove-spsolution -identity SampleSolution.wsp -confirm:$false

Backup-spsite –identity http://sitename  -path D:\backup\surya\9019.bak

Restore-SPSite –identity http://sitename  -path D:\backup\surya\9019.bak –force

Mount-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication http://sitename

Restore-SPSite -Identity "http://spdev5:8002/"  -Path "site_05312013.bak" -DatabaseName "sitedb"  -force -verbose

#Export SharePoint List
Export-SPWeb  "http://spdev5:8005" -path "D:\\Development\surya\ResourceLibrary.cmp" -ItemUrl Resource%20Library -IncludeVersions All

#Import SharePoint List
Import-SPWeb -Identity http://spdev5:8003 -path "D:\Development\surya\ResourceLibrary.cmp"


STSADM Commands


stsadm -o provisionservice -action start -servicetype spwebservice
stsadm -o backup -url  http://sitename  filename C:\Pulipati\testbackup.bak
stsadm.exe -o import -url http://sitename -filename C:\Export.cab -includeusersecurity

stsadm -o provisionservice -action start -servicetype Microsoft.SharePoint.Administration.SPWebService -servicename WSS_Administration


No comments:

Post a Comment

Followers