@QwertyMash
Really appreciate the script. We are attempting to use it in an on-prem Active Directory environment wherein we use AppLocker. The script will error during execuction at logon via GPO because when AppLocker is deployed and using enforced rules (at least in Powershell 5.1), Powershell runs in ConstrainedLanguage mode which prohibits your script from using the "class" function.
Are you aware of a way around this in deployment, or possibly something we can use instead of class?