Closed assassinscrack closed 4 months ago
Heya,
You're seeing this issue due to security policies that are applied to your system. This feature specifically is called constrained language mode, it restricts the methods and functions that can be used by powershell scripts. More information here: https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/
I'm not sure what specifically locked down powershell in your case. Usually this policy is applied by organizations through something like AppLocker. More information about this here: https://learn.microsoft.com/en-us/windows/security/application-security/application-control/windows-defender-application-control/applocker/applocker-overview
I will update the script to more gracefully handle these kind of situations, but I think it's unlikely the script can be updated to work with these heavy restrictions to powershell's capabilities.
Thanks for the info. After some research on this I managed to find the problem. There was a "__PSLockDownPolicy" set under Environment Variables; System Variables. Once I deleted this I was able to use the script without issue.
Description: I am getting a load of errors when trying to enter the app selection in Custom Mode. Additionally, no window opens up for actual selection.
Steps to reproduce the behavior:
Expected behavior: I expected a window popping up to show me the options.
Additional context: I have ran this tool as Administrator on my only user account after a fresh restart. Added screenshots for more info.