From Secrets of SharePoint – Tip of the Day
Niklas Goude
You can enable site audit using Windows PowerShell. The example below demonstrates how to add specific audit flags on a site collection and enable auditing:
PS > $spSite = Get-SPSite http://SP01.powershell.nu
PS > $spSite.Audit.AuditFlags =
>> ([Microsoft.SharePoint.SPAuditMaskType]::All `
>> -bxor[Microsoft.SharePoint.SPAuditMaskType]::View)
PS > $spSite.Audit.Update()
PS > $spSite.Dispose()





