2013年10月27日 星期日

SharePoint 2013 Backup Site

Set-ExecutionPolicy UnStricted
$ver = $host | select version
if ($ver.Version.Major -gt 1)  {$Host.Runspace.ThreadOptions = "ReuseThread"}
Add-PsSnapin Microsoft.SharePoint.PowerShell
Set-location $home

$f = Get-Date -format "yyyyMMdd-HHmmss"
$f = "ins_"+$f+".bak";
Backup-SPSite http://sp2013.redirectme.net/sites/ins -Path \\wh01\SP2013Backup\$f
echo exit