Pnp PowerShell To Hide List From Site Contents In SharePoint

Pnp PowerShell To Hide List From Site Contents In SharePoint

We all have come into a scenario where we want user to not go to site content in a site and see the list and let them change the data particularly when we want end user to play with the list.
However, if the user has saved the url of the list he can still open it
we can make list hidden and visible again only by powershell script

Here is the code to make any SharePoint List Hidden

$sUrl = "YourSiteCollectionURL"

Connect-PnPOnline $sUrl -UseWebLogin

$ListName="Documents"

#make list hidden

Set-PnPList -Identity $ListName -Hidden $true

Write-Host "Made List Hidden" -ForegroundColor Green

Pnp PowerShell To Unhide/Visible List

Comments

Popular posts from this blog

PnP Powershell To Update List Field In a List View

Pnp PowerShell To UnHide/Visible List From Site Contents In SharePoint