Monday, January 16, 2012

Powershell script change title of a document library in your Sharepoint 2010 site collection

#Change these variables to your site URL and list name
$site = Get-SPSite http://yoursite.com/
$listName = "Shared Documents"
#Walk through each site in the site collection
$site | Get-SPWeb | ForEach-Object {
#Get the list in this site
$list = $_.Lists[$listName]
#Make the list changes
$list.Title = "Documents"
$list.Description = "Use the Documents library to store shared files"
#Update the list
$list.Update()
}
#Dispose of the site object
$site.Dispose()

No comments:

Post a Comment