#Allows to use SharePoint cmdlets from inside the Windows PowerShell command window
If ((Get-PsSnapin |?{$_.Name -eq “Microsoft.SharePoint.PowerShell”})-eq $null)
{
Add-PsSnapin Microsoft.SharePoint.PowerShell | Out-Null
}
# Allow execution of scripts
Set-ExecutionPolicy -ExecutionPolicy “Unrestricted” -Force
Write-Host “Restoring site from backup”
restore-SPSite http://spsite/ -Path “c:\temp\spbackup.dat” -force -confirm
Write-Host -f Green “Completed site from backup”