# Web Application Level
$webAppUrl ="http://devvWebApp.com";
$key = "RKUTestFrmKey";
$value ="RKUTestFrmVal";
$spwebApp=Get-SPWebApplication -Identity $webAppUrl;
if($spwebApp.Properties.ContainsKey($key) -eq $False)
{
$spwebApp.Properties.Add($key,$value);
$spwebApp.Update();
}
Write-Host $spwebApp.Properties[$key]
# Site Level Property Bag
$siteurl = "http://devvWebApp.com";
$site = New-Object Microsoft.SharePoint.SPSite($siteurl)
$rootWeb = $site.RootWeb
$rootWeb.Properties.Add("RKUtest", "ValueRKUTest");
$rootWeb.Properties.Update();
Write-Host $rootWeb.Properties["RKUtest"];
No comments:
Post a Comment