Show Hide a SharePoint 2013 List using PowerShell

Recently my team got a requirement to hide a SharePoint 2013 list. Here we will discuss how we can show or hide a SharePoint 2013 list using PowerShell. The user should not see the list in Site content as well as in Quick Launch.

Here I have a list name as “MyTestList99” which I want to hide from site content.

PowerShell script to hide a SharePoint 2013 List

Below is the PowerShell script to hide a SharePoint List, which you can write in Windows PowerShell ISE or you can use Visual studio code to write, debug and test PowerShell scripts.

Open SharePoint Management Shell

Add-PSSnapin Microsoft.SharePoint.Powershell

$web = Get-SPWeb “http://win-pfcp2dgt8di/sites/EnjoySharePoint/”;

$list = $web.Lists[“MyTestList99”];

$list.Hidden = 1; //hiding the list in Site Contents

$list.OnQuickLaunch = $false; // hiding the list in Quick Launch

$list.Update();

PowerShell script to Show a SharePoint 2013 List:

Below is the PowerShell script to Show a SharePoint List:

Add-PSSnapin Microsoft.SharePoint.Powershell

$web = Get-SPWeb “http://win-pfcp2dgt8di/sites/EnjoySharePoint/”;

$list = $web.Lists[“MyTestList99”];

$list.Hidden = 0; //showing the list in Site Contents

$list.OnQuickLaunch = $true; // showing the list in Quick Launch

$list.Update();


Read some SharePoint PowerShell tutorials:

Hope this will be useful to you to show or hide a SharePoint 2013 list or document library.


You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →