AaronLocker icon indicating copy to clipboard operation
AaronLocker copied to clipboard

PowerShell 7 / Windows 11 Support

Open ivassallo19 opened this issue 1 year ago • 2 comments

Haven't seen a mention of this anywhere. Would be great for AaronLocker to be updated, to support PowerShell 7 / Windows 11. Currently, there are a couple of points.

  • The .ps1 files look for PSVersion 5.1. The way it looks for it (Major -ne 5 -or Minor -ne 1) means that if 7.1 exists it will pass, so that should be improved anyway
  • SupportFunctions.ps1 uses 'Get-Content -Encoding Byte', and Byte encoding type was removed/replaced, so this causes an error

I've been able to modify my copy, but would be useful to have the main branch updated with these changes.

ivassallo19 avatar Jun 20 '24 00:06 ivassallo19

Just an additional note. A few other changes in PowerShell 7.

  • Get-AppLockerFileInformation returns a FileInformation object, which has properties that are now a String, e.g. Hash is now a String instead of FileHash, so had to add logic that uses .Split for Hash as well as Publisher
  • Some instances where a cmdlet specifies an ErrorVariable, where if it is not triggered and the variable not set, .Count fails. I got around this by setting the variable first to an empty object

ivassallo19 avatar Jun 20 '24 04:06 ivassallo19