Ensure_Column_Group

Language:
PowerShell
Keywords:
SharePoint
Code Snippet

Function Ensure_Column_Group( [Microsoft.SharePoint.SPField]$tField
                                , $tGroupName) {
    if ($tField.Group -ne $tGroupName) {
        $tField.Group = $tGroupName
        
        Write-Output([System.String]::Format("Column [{0}] : Setting Group [{1}]", $tField.Title, $tGroupName))
        $tField.Update()
    }
} # Function Ensure_Column_Group(...)


Created 2011-10-13
comments powered by Disqus
Login