Since the integrated terminal in vscode uses powershell, we need to set the execution permissions of powershell.
Solution:
- Enter the C:\Windows\System32\WindowsPowerShell\v1.0 directory and find the powershell.exe file.
- Right-click the file and execute it with administrator rights.
- Execute the set-ExecutionPolicy RemoteSigned command and enter the y option.
- Restart vscode