Advertisement
PtiTom

SharePoint - Disable / Enable Audit log

Jan 21st, 2016
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $site = Get-SPSite <SiteCollectionUrl>
  2.  
  3. # Disable Audit log :
  4. $site.Audit.AuditFlags = 0
  5. $site.Audit.Update()
  6.  
  7. # Check :
  8. $site.Audit.AuditFlags
  9. # Must be : None
  10.  
  11. # Enable Audit log for view / read :
  12. $site.Audit.AuditFlags = [Microsoft.SharePoint.SPAuditMaskType]::View
  13. $site.Audit.Update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement