With my new pc I found a bug with "block powershell scripts":
If it's disabled, the powershell policy is still on "restricted" like it is with protection on.
This means script execution is never possible. It's not a bug in H_C I guess but a feature from Windows which set the policy to restricted by default.
Yes, it is not a bug. Microsoft chose "Restricted" as the default setting - it is not an Administrator Policy. This setting can be bypassed with standard rights to run scripts by a command-line without user interaction. So, any malware can run PowerShell scripts without a problem, and the PowerShell scripts can be accidentally run by the user via BAT, CMD, Windows Script Host, shortcuts, etc.
Anyway H_C should change the policy to "bypass" if protection is disabled.
I test this with powershell command
Get-ExecutionPolicy
Let's suppose that you use Windows standard settings + the H_C setting <Block PowerShell Scripts> = ON. When you will run the command
get-executionpolicy -list in the Powershell console, then you will see the full list of PowerShell restrictions, like the below:
Scope ExecutionPolicy
----- ---------------
MachinePolicy
Restricted <--------------- This comes from the H_C setting
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine
Restricted <---------------- This is the default Windows setting
As it can be seen the H_C setting does not overwrite the default Windows setting, but only overrides it.
When you set <Block PowerShell Scripts> = OFF in H_C, then the settings will look like (PowerShell console has to be closed and run again):
Scope ExecutionPolicy
----- ---------------
MachinePolicy
Undefined <--------------- This comes from the H_C setting
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine
Restricted <---------------- This is the default Windows setting