The following problems occur when using the terminal in vscode to run the script under windows
. Solutions:
- To
管理员身份
open vscode, open a terminal arbitrarily - Enter in the terminal
get-ExecutionPolicy
, if it returnsRestricted
, it means that vscode is now forbidden to run the script
- Enter
set-ExecutionPolicy RemoteSigned
this command - Look at the current state again, enter
get-ExecutionPolicy
to run the script~!