PtiTom

SharePoint - Disable / Enable Audit log

Jan 21st, 2016
86
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()
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×