'Using visual studio code without access to powershell

I installed visual studio code & downloaded python extension, When trying to execute code, I get an error that:

The terminal process failed to launch: A native exception occurred during launch 
   (File not found: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe)

I am not the admin of this laptop as this is office laptop & don't have access to powershell nor will i get the access due to policy. Please suggest what I can do as a remedial measure — I have used only IDLE before for python. How to run code?



Solution 1:[1]

You can change your VScode Terminal default profile

First select default profile

Select default profile

enter image description here

Then change from powershell to cmd

Solution 2:[2]

You can try to add this in the settings.json file:

  "terminal.integrated.defaultProfile.windows": "Command Prompt",
  "terminal.integrated.profiles.windows": {
    "PowerShell": {
      "source": "PowerShell",
      "icon": "terminal-powershell",
      "path": ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"]
    },
    "Command Prompt": {
      "path": [
        "${env:windir}\\Sysnative\\cmd.exe",
        "${env:windir}\\System32\\cmd.exe"
      ],
      "args": [],
      "icon": "terminal-cmd"
    }
  },

If your cmd was forbidden too, you can try to download the Code Runner Extension to execute the code.

Solution 3:[3]

I had a problem with my Visual studio code, it didn't let me open the terminal it gave me an error "The terminal process failed to launch: A native exception occurred during launch(File not found: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe)". I solved it by installing the Code Runner Extension.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 badhusha muhammed
Solution 2 Steven-MSFT
Solution 3 Dharman