Ensure_List_RequiresContentApproval

Language:
PowerShell
Keywords:
SharePoint
Code Snippet

Function Ensure_List_RequiresContentApproval( [Microsoft.SharePoint.SPList]$tList
                                            , $RequiresContentApproval
                                            ) {
    if ($RequiresContentApproval -ne $tList.EnableModeration) {
        $tList.EnableModeration = $RequiresContentApproval
        Write-Output([System.String]::Format("List [{0}] : Setting Content Approval [{1}]", $tList.Title, $RequiresContentApproval))
        $tList.Update()
    }
} # Function Ensure_List_RequiresContentApproval(...)


Created 2011-10-13
comments powered by Disqus
Login