Tue. Jun 7th, 2022

#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”

This website uses cookies. By continuing to use this site, you accept our use of cookies.