When win11 uses Windows PowerShell to execute scripts, it prompts that running scripts is prohibited on this system
Solution (follow the steps):
- Start by running PowerShell as an administrator.
- Enter set-ExecutionPolicy RemoteSigned on the command line and press Enter, then enter Y and press Enter.
- So far the problem is solved.
- If the following red error occurs.
- On the command line, enter Set-ExecutionPolicy -Scope CurrentUser and press Enter, then enter RemoteSigned, and then enter Y and press Enter.