param([string]$webUrl="http://spdev", [string]$contentTypeName="myContenttype", [string]$fieldName="myTitle", [boolean]$required=$true) if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin Microsoft.SharePoint.PowerShell } clear $web = Get-SPWeb $webUrl $ct = $web.ContentTypes[$contentTypeName]; $oldSealedValue = $ct.Sealed; Write-Host "content type Sealed Property $($ct.Sealed)" if($ct.Sealed) { $ct.Sealed = $false; } $field = $ct.FieldLinks[$fieldName]; $field.Required = $required; Write-Host "set field $($fieldName) Required $($ct.Required)"   if($oldSealedValue) { $ct.Sealed = $true; } $ct.Update($true); $web.Update(); $web.Dispose();