powershell을 사용할 수 있습니다. this question에서 : 당신이 좋은 문이 작동 대체 어떻게 해결해야합니다
function ProcessWeb($currentWeb)
{
if([Microsoft.SharePoint.Publishing.PublishingWeb]::IsPublishingWeb($currentWeb))
{
$publishingWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($currentWeb)
$publishingPages = $publishingWeb.GetPublishingPages()
foreach ($publishingPage in $publishingPages)
{
if($publishingPage.ListItem.File.CheckOutStatus -eq "None")
{
UpdatePage -page $publishingPage
}
}
Write-Host -ForegroundColor red "FINISHED"
}
else
{
Write-Host -Foregroundcolor Red "^ not a publishing site"
}
}
function UpdatePage($page)
{
$page.CheckOut();
Write-Host -Foregroundcolor green $page.Url;
$NewPageContent = $page["PublishingPageContent"].Replace("/place1/place2/link","/place3/place4/link");
$page["PublishingPageContent"] = $NewPageContent
$page.ListItem.Update();
$page.CheckIn("nothing");
$page.ListItem.File.Approve("Updated PublishingPageContent to replate place1/place2 with place3/place4");
}
ProcessWeb(Get-SPWeb -identity http://myintranet.com)
참고. 또한이 작업은 잘못 될 수있는 변경 사항을 자동화하므로 프로덕션 환경에서 콘텐츠 데이터베이스를 백업하기 전에 먼저 dev/uat 환경에서 수행해야합니다.
출처
2013-02-14 00:33:44
Nat
파일이 같은 위치에 있거나 몇 개 위치에 있으면 컴퓨터에 복사해야합니다. 페이지가 라이브러리에 있으면 탐색기보기를 사용하여 페이지를 복사 할 수 있습니다. 그런 다음 링크를 변경하는 스크립트를 실행합니다. 이제는 PowerShell (Windows 기반이라고 가정) 및 정규 표현식을 배우는 좋은 시간입니다! –