Documentation
Install AuditPolicy
Install AuditPolicy from the PowerShell Gallery.
Install AuditPolicy before trying the curated Windows audit policy examples.
Install-Module -Name AuditPolicy -Scope CurrentUser
Import-Module AuditPolicy
Use an elevated PowerShell session when the task changes local audit policy settings.