Identifying anonymously accessible content with PowerShell

Granular permissions, such as permissions on individual documents or list items, in SharePoint can be difficult to manage and identify. We can identify permissions given to content in PowerShell. In this recipe, we will check the anonymous status of a SharePoint site, which content in the site provides permissions to anonymous users, and which content does not.

How to do it…

Follow these steps to identify anonymous access to content using PowerShell:

  1. Get the SharePoint site with the Get-SPWeb Cmdlet:
    $web = Get-SPSite http://sharepoint
    
  2. Output the anonymous access configuration for the site from the AnonymousState property as follows:
    $web.AnonymousState
    
  3. Output the lists in the site that provide ...

Get SharePoint 2013 WCM Advanced Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.