$siteUrl = "http://servername/sites/P127036/"
[system.reflection.assembly]::LoadWithPartialName("Microsoft.Sharepoint") > $null
$site = New-Object Microsoft.SharePoint.SPSite($siteUrl)
$RootWeb = $site.RootWeb
$lookForList ="Tasks"
$TaskList= $RootWeb.Lists[$lookForList]
if ($TaskList -ne $null)
{
$TaskContentType = $TaskList.ContentTypes["Custom Tasks"]
if ($TaskContentType -ne $null)
{
$TaskContentType.Name = "Tasks"
$TaskContentType.Update()
}
}
# Dispose the site object if ($site) {$site.Dispose()}if ($RootWeb){ $RootWeb.Dispose()}
Tuesday, August 2, 2011
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
-
▼
2011
(49)
-
▼
August
(33)
- Sharepoint 2010: Folder Modified Date doesn't get ...
- Sharepoint 2010: Hide ContentType Field using Powe...
- Sharepoint 2010: Update SPNavigationNode Title
- Sharepoint 2010 : Display All Calendar Workspaces ...
- sharepont 2010:Display thumbnail view of picture l...
- Sharepoint 2010 : Display Thumbnail view for Pictu...
- Redirect from newMWS.aspx page to custom page
- Sharepoint 2010 : Create or Provisioning Custom Ed...
- Sharepoint 2010 : Show dialog box for custom "Add ...
- Sharepoint 2010: show "Add new item" or "Add new"...
- Sharepoint 2010 : Create or Delete View programmat...
- Sharepoint 2010 : Custom ListView WebPart
- Links
- Define Content types in Sharepoint 2010
- Reset ContentType Order in SharePoint 2010
- Remove roles from Sharepoint list item
- Hide Content types in the sub Folders in Sharepoin...
- Add Content types to List or Library in Sharepoint...
- Set Selected Content type in Dropdown in Sharepoin...
- Create Site Collection programmatically in Sharepo...
- Create Documentset programmatically in Sharepoint ...
- Get all Calendar Workspace Events in Sharepoint 2010
- Get Sharepoint Control ID using Javascript in Shar...
- Hide content types from new menu using Javascript ...
- Disable New Menu Button Prompt in Sharepoint 2010
- Create Folder in SharePoint List or Library progra...
- Update folder name of List or Library programmatic...
- Update content type filed in the shareponit 2010 l...
- upgrade sharepoint 2010 wsp using powershell script
- Update Title Sharepoint 2010 List using Powershell...
- Rename Content type name in the list using Powershell
- Update Workspace URL using Powershell
- create custom field Person/ Group in Sharepoint 2010
-
▼
August
(33)
Doesn't work
ReplyDelete