$site=Get-SPSite "http://serverName:1111/"
$web=$site.RootWeb
$list=$web.Lists["Shared Documents"]
$currentOrder = $list.ContentTypes
$result=New-Object System.Collections.Generic.List[Microsoft.SharePoint.SPContentType]
foreach ($ct in $currentOrder)
{
if ($ct.Name.Contains("_CustomContentType"))
{
$result.Add($ct)
}
}
$list.RootFolder.UniqueContentTypeOrder = $result
$list.RootFolder.Update()
Loading

Join the conversation! Your thoughts help the community grow.