How do I "switch back" to Powershell source code editor in VSCode?

Welcome Forums General PowerShell Q&A How do I "switch back" to Powershell source code editor in VSCode?

Viewing 1 reply thread
  • Author
    • #187453
      Topics: 75
      Replies: 120
      Points: 535
      Rank: Major Contributor

      I have been running VSCode with Powershell 6.1 (pwsh.exe) for several months.  Then a few months ago I installed Anaconda Python 3.7 and configured VSCode to support one of the Python extensions.  All worked fine, and I have for a few months not been running or testing Powershell scripts.  Recently I have the need to update one of my PS scripts (*.ps1) and somehow, the VSCode editor treats the .ps1 file I opened (a working PS script) as if it were a Python program.  I must be missing some knowledge of a VSCode command or setting that tells VSCode editor I am now editting PS source code (i.e., script files) and not Python (*.py) source code.  In general, I am missing the proper steps to swtich back-and-forth between different languages in VSCode.  Would be grateful for any tips and guidance.  Thanking you in advance.


    • #187495
      Senior Moderator
      Topics: 8
      Replies: 1141
      Points: 3,927
      Helping Hand
      Rank: Community Hero

      You can post this in

      btwn, see whats your default shell. Ctrl+Shift+P , then type default shell.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.