Ensure_List_Hidden

Language:
PowerShell
Keywords:
SharePoint
Code Snippet

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


Created 2011-10-13
comments powered by Disqus
Login