Blue Theme Orange Theme Green Theme Red Theme
 
Nevron Gauge for SharePoint
Home | Forums | ASP.NET 2.0 Tutorials | Web Services | How Do I...? | Class Browser | WPF Quick Starts | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
Search :       Advanced Search »
Home » Blogs Home » Blog Detail

Using Powershell for deploying Sharepoint 2010 Solution and Backup/Restore

 by Vijay Settu on Jan 18, 2012

In this blog I will describe how can we use powershell for deploying Sharepoint 2010 Solution and to performe Backup/Restore operations.
Comments: 0 Views: 649 Printable Version 
Now, let see how to deploy the SharePoint 2010 solution using Powershell.
 
Step 1 : Start->All Programs->MicrosoftSharepoint2010Products->open Sharepoint2010Managementshell
 
Type the command
 
Step 2 : Add-SPSolution “C:\SharePoint2010Solution.wsp”
 
Step 3 : Install-SPSolution -Identity SharePoint2010Solution.wsp -WebApplication http://myserver -GACDeployment
 
If you are using Sandbox Solution
 
Step 4 :
Install-SPUserSolution -Identity SharePoint2010Solution.wsp -WebApplication http://myserver -GACDeployment
 

For Updating the Sharepoint 2010 Solution type the following commands.
 
Step 5 : Update-SPSolution -Identity SharePoint2010Solution.wsp -LiteralPath “C:\SharePoint2010Solution.wsp” -GacDeployment
 
For retract and remove a solution, type the following commands:
 
Step 6 : Uninstall-SPSolution -Identity MySharePointSolution.wsp -WebApplication http://myserver

Step 7 :
Remove-SPSolution-Identity MySharePointSolution.wsp
 

Now let's see how to take Backup and Restore using Powershell.
 
Backup a Site collection with PowerShell command.
 
In SharePoint 2010, Power Shell command Backup-SPSite is used for taking backup. you can get details of the command from the msdn link. The following command will back up the site collection “
http://myserver”.
 
Backup-SPSite -Identity http://myserver -Path "
c:\backup\files.bak"
 
Restore a Site Collection with PowerShell command.
 
To restore site collection you'll use the following command. Use -Force if you want to overwrite the existing site collection.
 
Restore-SPSite -Identity http://myserver -Path "
c:\backup\files.bak"
Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
 
What do you say about this post? Post a comment here
*Title:
*Comment:
 
Comments not available.
Team Foundation Server Hosting
Become a Sponsor

 Blogger's Profile
Age: Not Available
Location:
Title: Developer
Joined: Jan 16, 2012
Education: Not Available
 More Blogs from this Blogger
No record available
 Latest Blogs
[Video] OnClose Handler
[Video] Storing and Loading the Window and Toolbar position
The Euclidean Algorithm
Swapping Exe Process
How Exe file is Generated by VS2005 C++ Project?
What is Exe
Header files: Multiple Inclusion problem - Solution B
Header files: Multiple Inclusion problem - Solution A
Header files: Multiple Inclusion problem - Reason
Header files: Multiple Inclusion problem
View all »
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 
Team Foundation Server Hosting
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.