0
1

More than 3 years have passed since last update.

Visual Studio Code で PowerShell のバージョンを切り替える

Last updated at Posted at 2021-08-01

Windows PowerShell (PowerShell 5.1 以前) と PowerShell Core (PowerShell 6 以降) の両方がインストールされている場合、以下の方法で使用するバージョンを切り替えることができる。

  1. コマンドパレットを開く(Ctrl + Shift + P
  2. PowerShell: Show Session Menu を開く
  3. 使用するバージョンを選択する

image.png

設定ファイルに反映される。

settings.json
{
    "powershell.powerShellDefaultVersion": "PowerShell (x64)"
}
settings.json
{
    "powershell.powerShellDefaultVersion": "Windows PowerShell (x64)"
}

現在使用しているバージョンを確認する。

$PSVersionTable.PSVersion

image.png
image.png

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1