I have created a new version of this script so that it is better aligned with the conventions I use for other PowerShell scripts.
While doing incident response, if AppLocker is being used but the computer still got infected by a malicious executable, it is useful to know exactly what AppLocker policy is currently applied.