Hide the list in SharePoint using PowerShell

Advertisements
In this article we are able to see how to hide list from SharePoint site collection, site or sub site.
We don’t want to show the list’s or document libraries to the Users in the site and also we want to hide it from quick launch, for that we can hide it easily using PowerShell script.

Add-PSSnapin Microsoft.SharePoint.Powershell
$web = Get-SPWeb "http://dotentsharepoint.com/sites/sharepoint/hidelist";
$list = $web.Lists["HideList"];
$list.Hidden = 1; //hiding the list in site contents
$list.OnQuickLaunch = $false; // hiding the list in quick launch
$list.Update();


In this same way if you want to show it again use the below script

Add-PSSnapin Microsoft.SharePoint.Powershell
$web = Get-SPWeb "http://dotentsharepoint.com/sites/sharepoint/hidelist";
$list = $web.Lists["HideList"];
$list.Hidden = 0; //showing the list in site contents
$list.OnQuickLaunch = $true; // showing the list in quick launch
$list.Update();


SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM
Advertisements
SHARE

lakshmitulasi Jasti

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment