0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Powershellスクリプトの開発環境をVSCodeで構築

Last updated at Posted at 2024-12-30

PowerShellスクリプトのコードエディタとして、PowerShell ISEを活用されている方も多いのではないでしょうか。
しかし、現在のPowerShell 7.X~以降の開発環境としてVisual Studio Code(以降VSCode)の活用が公式から案内されていることから、VSCode上でPowerShellを利用できる環境の構築について解説します。

前提条件

・PowerShell 7.x~以降を利用していること
※PowerShellにて $PSVersionTable の実行結果から自身が利用している端末の
PowerShellバージョンを確認。

PSVersionの値から自身の利用しているPowerShellのバージョンを確認できます。

・VSCodeがインストール済みであること
※本記事ではVSCodeのインストール方法については割愛します。

VSCodeへPowerShell拡張機能をインストール

1.VSCodeを起動
※起動方法については割愛

2.「ctrl」+「P」を押し、Quick Openを起動

3.Quick Openを開き、「ext install powershell」と入力し検索
image.png

4.「拡張機能」ビューが開くので、MicrosoftのPowerShell拡張機能をインストール
※インストール後、「インストール」ボタンが再読み込みに変化した場合は「再読み込み」を選択
image.png

5.編集が可能となる

まとめ

今回の解説範囲はあくまで、Powershellスクリプトの開発環境としてVSCodeを利用するという点に焦点を当てた解説となっております。
需要があれば詳細な設定関連についても解説できればと思います。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?