How to use Windows API AuditEnumerateCategories function in PowerShell?
问题 I want get the current Advanced Security Audit Policy using PowerShell. I could use auditpol.exe , but its ouput is different per OS language, which makes it difficult to parse. The settings are stored in a REG_NONE value in HKEY_Local_Machine\Security\Policy\PolAdtEv . I could try to parse the value with the help of that unofficial structure table. My preferred approach, however, is to use the Windows API function AuditQuerySystemPolicy of advapi32.dll . With the great help of this article,