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
Comments
Post a Comment