Solve the problem that vs code cannot run the script

Operating vs Code as Administrator

Execute: get executionpolicy displays restricted   Indicates that the status is prohibited

Execution: set executionpolicy displays remotesigned   

Execute again at this time     get-ExecutionPolicy   display   RemoteSigned   Now it can be used normally

Similar Posts: