SP: PS update calendar overlays after backup/restore move
$orig = "http://acmeprd/schedule"
$dest = "http://acmedev/schedule"
$web = get-spweb $dest
$cal = $web.Lists["Room Schedule"]
$views = $cal.Views|%{$_}
foreach($v in $views){
if($v.CalendarSettings -ne $null -and $v.CalendarSettings -match $orig){
$v.Title
$v.CalendarSettings = $v.CalendarSettings.Replace($orig, $dest)
$v.Update()
}
}
Comments