Forum Discussion
Avian 1
Sep 25, 2022Iron Contributor
How to generate a list of hidden items from list or document library list?
Hello, How to generate a list of hidden items from list or document library list using PowerShell? Regards Avian
Avian 1
Sep 26, 2022Iron Contributor
Hello Ganeshanap,
Yes, we have the site collection admin access.
If you so many document library and underneath so many folders, it is vert difficult to go each list and library if they are hidden or not.
I am sure using this we can generate the list for all the sites and sub sites.
Regards
Avian
Yes, we have the site collection admin access.
If you so many document library and underneath so many folders, it is vert difficult to go each list and library if they are hidden or not.
I am sure using this we can generate the list for all the sites and sub sites.
Regards
Avian
ganeshsanap
Sep 26, 2022MVP
Avian 1 You can use below PowerShell to get items with unique permissions using PowerShell:
SharePoint Online: Get All List Items with Unique Permissions using PowerShell
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- Avian 1Sep 26, 2022Iron ContributorI tried it, and it shows the lib and where permission are uniqies. I am looking for those items which are hidden.
- NanddeepNachanSep 26, 2022Learn Expert
Below script should give you all hidden lists / libraries in all sites
$SiteURL = "https://domain-admin.sharepoint.com/" $UserName = "email address removed for privacy reasons" $Password = "********" $SecureStringPwd = $Password | ConvertTo-SecureString -AsPlainText -Force $Creds = New-Object System.Management.Automation.PSCredential -ArgumentList $UserName, $SecureStringPwd Function Login { [cmdletbinding()] param([parameter(Mandatory = $true, ValueFromPipeline = $true)] $Creds) Write-Host "Connecting to Tenant Admin Site '$($SiteURL)'" Connect-PnPOnline -Url $SiteURL -Credentials $creds Write-Host "Connection Successfull" } Function AllSiteCollAndSubWebs() { Login($Creds) $TenantSites = (Get-PnPTenantSite) | Select Title, Url ForEach ( $TenantSite in $TenantSites) { Connect-PnPOnline -Url $TenantSite.Url -Credentials $Creds Write-Host $TenantSite.Title $TenantSite.Url $subwebs = Get-PnPSubWebs -Recurse | Select Title, Url foreach ($subweb in $subwebs) { Connect-PNPonline -Url $subweb.Url -Credentials $Creds $hiddenLists = Get-PnPList | Where {$_.Hidden -eq $true} foreach ($hiddenList in $hiddenLists) { Write-Host $hiddenList.Title } } } } AllSiteCollAndSubWebs
- NanddeepNachanSep 26, 2022Learn Expert
Hi Avian 1
Can you share your script to know it better?
Another thing - only lists and libraries can be made hidden and not list items. You can apply permissions on list items.