I have auditing turned on in my 2019 on-prem environment but I can't seem to figure out how to dump the audit for a single library to a CSV with powershell or Pnp. I know that these is no GUI way to do it, but surely this is possible. I've been trying to use this as a starting point, https://nikcharlebois.com/get-audits-for-a-sharepoint-document-using-powershell/ , but it dies on these lines:

$audit = $docLibrary.Audit
$auditEntries = $audit.GetEntries()

Any help would be greatly appreciated.

1 Answer 1


Never mind, it was a permissions issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.