mattifestation / WDACTools

A PowerShell module to facilitate building, configuring, deploying, and auditing Windows Defender Application Control (WDAC) policies
BSD 3-Clause "New" or "Revised" License
201 stars 34 forks source link

Only look up SIDs as found in logs #4

Closed theaquamarine closed 2 years ago

theaquamarine commented 2 years ago

Get-CimInstance Win32_Account can be very slow, so start by delaying it until Get-WDACApplockerScriptMsiEvent or Get-WDACCodeIntegrityEvent is used rather than doing it at module import. I then switched to only looking up SIDs as they were found in the logs rather than looking up all domain accounts to save time, since generally only a relatively small number of accounts appear in the logs.