if you need to learn Windows and SharePoint Power shell from scratch refer to these you tube videos, I admit I am a fan on how simple they make it seem.
Part 1 is Windows powershell at:
https://www.youtube.com/watch?v=Qo4-9VWG51I
part 2 applying these in Sharepoint at:
https://www.youtube.com/watch?v=pN7NqeF6a7E
check it out we are sure you wont regret
This Blog contains information about Microsoft products like Sharepoint, SQL, IIS, ASP.net and More. This Blog contains Facts about diffrent Products and will advance gradually, Do leave me comments to make this Blog useful and Informative and better
Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts
Wednesday, March 12, 2014
Wednesday, December 19, 2012
Adding and Deploying Solutions in SharePoint 2010
Adding and Deploying Solutions in SharePoint 2010
How we can add solutions in SharePoint 2010 ?
We can add solution via common line using either STSADM or PowerShell command while solution deployment can be done either via Central Admin or using STSADM or PowerShell
Command line:
Using STSADM:
stsadm.exe -o addsolution -filename yoursolutionpackage.wsp
Using PowerShell:
Add-SPSolution -LiteralPath <SolutionPath>
Now here comes deployment part
- Deploy Solution using Central Administration
- Open Central Administration
- Go to System Settings
- Click on Manage farm solutions
- Select the solution from the list
- Select Deploy Solution and select the web application where you want to deploy it
- Click OK when you are done.
- Click Deploy Solution
- That’s all, we are done with deployment
Command line:
Using STSADM:
stsadm -o deploysolution -name yoursolutionpackagename.wsp -url http://sp-mach/ -local -force
Using PowerShell:
Install-SPSolution -Identity <SolutionName> -WebApplication <URLname>
Uninstallation and Retraction of a Solution in SharePoint 2010
Uninstallation and Retraction of a Solution in SharePoint 2010
Using STSADM:
stsadm -o retractsolution -name solutionName.wsp -immediate
stsadm -o deletesolution -name solutionName.wsp
Using PowerShell:
Uninstall-SPSolution -identity solutionName.wsp
Remove-SPSolution -identity solutionName.wsp
Tuesday, November 6, 2012
Programmatically create a host-named site collection
In addition to using the Windows PowerShell to create host-named sites, you can use the SharePoint Server 2010 object model. The following code sample creates the host-named site collection with the URL
http://host.header.site.url in the SharePoint Server 2010 Web application with the URL http://servername:SPWebApplication webApp = SPWebApplication.Lookup(newUri("http://servername"));SPSiteCollection sites = webApp.Sites;SPSite Site = null;Site = sites.Add("http://hoster.contoso.com", "Site_Title","Site_Description", 1033, "STS#0", "contoso\owner","Owner_Display_Name", "Owner_Email", "contoso\secondaryowner,"Secondary_Owner_Display_Name", "Secondary_Owner_Email", true);SharePoint Server 2010 ships with a set of Web services for various user and administrative tasks. One of these administrative tasks is creating a new site collection. The CreateSite Web service method does not support the creation of host-named site collections. A workaround for this issue is to write a Web service that wraps the API sample code.
Tuesday, July 31, 2012
Top 5 Free PowerShell Scripts for SharePoint
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Saturday, June 16, 2012
Restore a Web application in SharePoint 2010 using Windows PowerShell
- Open SharePoint 2010 Management Shell.
- At the Windows PowerShell command prompt, type the following command:
Restore-SPFarm -Directory <BackupFolderName> -RestoreMethod Overwrite -Item <WebApplicationName> [-BackupId <GUID>] [-Verbose]
3. If you do not specify the value of the BackupID parameter, the most recent backup will be used.
4. You cannot restore a Web application by using a configuration-only backup.
5. You can view the backups for the farm by typing the following
Get-SPBackupHistory -Directory <BackupFolderName> -ShowBackup
Saturday, June 9, 2012
How to restore content database using PowerShell in SharePoint 2010 ?
- Open SharePoint 2010 Management Shell.
- At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:
Restore-SPFarm -Directory <Backup folder name> -RestoreMethod Overwrite -Item <Content database name> [-BackupId <GUID>] [-Verbose]
3. If you do not use the BackupId parameter, the most recent backup will be used. To view a list of the backups, including their Backup IDs, type the following command, and then press ENTER:
Get-SPBackupHistory -Directory <Backup folder>
Subscribe to:
Posts (Atom)