Sharepoint Native audit

Faye Müller 96 Reputation points
2021-03-22T07:43:43.207+00:00

Hi, I need some help to list all site with audit option "Opening or downloading documents, viewing items in lists, or viewing item properties" enabled. Can anyone help me? Thanks Regards Faye

SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,785 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Trevor Seward 11,681 Reputation points
    2021-03-22T18:18:34.797+00:00

    What version of SharePoint Server? This functionality was removed as of SharePoint Server 2019.

    0 comments No comments

  2. Elsie Lu_MSFT 9,751 Reputation points
    2021-03-23T06:58:47.087+00:00

    Hi anonymous user ,

    Could you please add more detailed information about your needs or issues? Is the requirement to view the audit data or list all sites?

    Per my understanding, if you want to see the audit data, you need to wait for your timer job to run after completing the settings, and your report will be automatically generated to the library you specify.

    ================================

    Or if it is to list all sites and subsites, you could try the following script:

    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null   
    $siteUrl = Read-Host "Enter Site URL"   
    $rootSite = New-Object Microsoft.SharePoint.SPSite($siteUrl)  
    $spWebApp = $rootSite.WebApplication  
    $count = 0  
               write-host "Site Collections"   
               write-host ""   
        foreach ($site in $spWebApp.Sites) {   
            $count++  
            write-host "Site Collections URL --> -->" $site.URL   
               write-host ""   
               write-host "SubSites"   
               write-host ""   
        foreach ($web in $site.AllWebs) {   
            $count++  
            write-host "SubSite URL --> --> -->" $web.URL    
            write-host ""  
        }    
    }  
    write-host "Total Count :" $count  
    

    Result:
    80532-4.jpg

    Reference:
    List of Sites and Subsites


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments