There are two general methods to run PS scripts when using WHHLight:
METHOD nr 1
Run WHHLight and temporarily switch OFF SWH restrictions:
View attachment 289191
Do the scripting job (WHHLight does not restrict scripts).
METHOD nr 2
Set the * PowerShell Restrictions * to Not configured:
View attachment 289192
In the second case, PowerShell is still restricted by Constrained Language Mode (implemented via SRP).
*********************************
It is worth mentioning that, except for WHHLight restrictions, PowerShell can be independently restricted by Microsoft Defender ASR rules or FirewallHardening outbound block rules.
Other possibilities, like running from the PowerShell Console or conversion to Batch scripts, will be explained in subsequent posts soon.