Tuesday, August 2, 2011

Update Title Sharepoint 2010 List using Powershell 2010

$siteUrl = "http://servername/sites/P127036/"
[system.reflection.assembly]::LoadWithPartialName("Microsoft.Sharepoint") > $null
$site = New-Object Microsoft.SharePoint.SPSite($siteUrl)
$RootWeb = $site.RootWeb
$lookForList ="Bookmarks"
 $BookmarksList= $RootWeb.Lists[$lookForList]
   if ($BookmarksList -ne $null)
    {
   $BookmarksList.Title = "Links"
   $BookmarksList.Update()
 }

# Dispose the site object
if ($site) {$site.Dispose()}
if ($RootWeb){ $RootWeb.Dispose()}

No comments:

Post a Comment

Followers

Blog Archive