Showing posts with label Windows PowerShell. Show all posts
Showing posts with label Windows PowerShell. Show all posts

12 September, 2013

Learning PowerShell from Microsoft Resources


These days PowerShell has become a very strong scripting language to manage any MS technology from the command prompt.

However, the person like me who is a newbie to SharePoint keeps thinking from where to start and how to start.

So here I have presented some of the resources for my reference and others reference from Microsoft and these can be quickly referred to.

Windows PowerShell Quick Reference

Windows PowerShell Scripting from TechNet Learning Section

PowerShell for Beginners from Wiki library Section

Windows PowerShell for SharePoint 2013 IT pros

Windows PowerShell for SharePoint Command Builder


Hope this piece of information will be helpful for you all and will let you refer to any external resources other than the MS Ocean.

If you have any queries and questions please do let me know. I would be more than happy to answer those.

Applies to:
1)   SharePoint 2010
2)   SharePoint 2013
3)   Windows PowerShell 3.0

14 August, 2012

Restore a Web application in SharePoint Server 2010 using Windows PowerShell

You can use Windows PowerShell to restore a Web application manually or as part of a script that can be run at scheduled intervals.

To restore a Web application by using Windows PowerShell
1. On the Start menu, click All Programs.
2. Click Microsoft SharePoint 2010 Products.
3. Click SharePoint 2010 Management Shell.
4. At the Windows PowerShell command prompt, type the following command:
Restore-SPFarm -Directory (BackupFolderName) -RestoreMethod Overwrite -Item (WebApplicationName) [-BackupId (GUID)] [-Verbose]

Where:
- BackupFolderName, is the full path to the folder you use for backup files.
- WebApplicationNam, is the name of the Web application that was backed up.
- GUID, is the identifier of the back up to use for the restore operation.

If you do not specify the value of the BackupID parameter, the most recent backup will be used. You cannot restore a Web application by using a configuration-only backup. You can view the backups for the farm by typing the following:
Get-SPBackupHistory -Directory -ShowBackup