0
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Visual Studio Code で新しい Power Shell を利用する方法

Last updated at Posted at 2021-02-14

Visual Studio Code のターミナルに表示される

「新しいクロスプラットフォームの PowerShell をお試しください」

というメッセージがうっとおしいので表示されないようしちゃいましょう!

vscode-new-powershell_01.png

メッセージが表示される原因

Visual Studio Code のターミナルは、デフォルトでは Power Shell で実行しており、Power Shell のバージョンが古い場合にこのメッセージが表示されます。
そのため新しい Power Shell をインストールすれば表示されなくなります。

最新版の Power Shell をダウンロードする

PowerShell/PowerShell からインストーラーをダウンロードします。

  • 64bit 版 Windows:Windows (x64)
  • 32bit 版 Windows:Windows (x86)

LST (Long Term Support) 版をインストールしました。

vscode-new-powershell_02.png

Power Shell をインストールする

ダウンロードしたインストーラーを起動してインストールします。
全部 Next を押しました。

vscode-new-powershell_03.png

vscode-new-powershell_04.png

vscode-new-powershell_05.png

vscode-new-powershell_06.png

vscode-new-powershell_07.png

vscode-new-powershell_08.png

Visual Studio Code で利用する Power Shell を変更する

新しくインストールした Power Shell は Windows に最初からインストールされている Power Shell とは別のプログラムとしてインストールされます。
インストールした Power Shell を利用するためには Visual Studio Code の設定を変更する必要があります。

ターミナル上部のプルダウンをクリックし、「既定のシェルの選択」をクリックします。

vscode-new-powershell_09.png

表示されたコマンドパレットから PowerShell C:\Program Files\PowerShell\7\pwsh.exe を選択します。

vscode-new-powershell_10.png

Visual Studio Code を再起動する

Visual Studio Code を再起動しターミナルを表示すると…
「新しいクロスプラットフォームの PowerShell をお試しください」
というメッセージが表示されなくなりました!

vscode-new-powershell_11.png

0
4
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
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?