XYZ.doc (We wanted the title = 'Test Document') when this document was migrated it would show up like XYZ.doc title = 'ABC Document' .
After a little digging we discovered it was the property promotion of SharePoint.
I came across some powershell script and here's my version ...
param($url=$(Throw "Parameter missing: -url"), $switch=$(Throw "Parameter missing (on/off): -switch"))
"URL -> $url, swith-> $switch"
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site = New-Object Microsoft.SharePoint.SPSite($url)
$enabled = $true
if ($switch -match "off") {$enabled=$false};
"Current Setting;"+$site.RootWeb.ParserEnabled;
$site.RootWeb.ParserEnabled = $enabled
$site.RootWeb.Update();
"After Setting;"+$site.RootWeb.ParserEnabled;
"Current Setting;"+$site.ParserEnabled;
#$site.ParserEnabled = $enabled
#$site.Update();
#"After Setting;"+$site.ParserEnabled;
foreach ($web in $site.AllWebs)
{
"Current Setting;"+$web.ParserEnabled;
$web.ParserEnabled = $enabled;
$web.Url +"["+$web.ParserEnabled+"]";
$web.Update();
"After Setting;"+$web.ParserEnabled;
}
No comments:
Post a Comment