Saturday, June 16, 2012

Restore a Web application in SharePoint 2010 using Windows PowerShell

  1. Open SharePoint 2010 Management Shell.
  2. 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

No comments: