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 をショートカットで呼び出すところから、できることまで

0
Last updated at Posted at 2026-04-08
Page 1 of 11

PowerShell をショートカットで呼び出すところから、できることまで

0. まず区別

  • Windows Terminal
    黒い画面を開くためのアプリ
  • PowerShell
    その中で動かすコマンドやスクリプトのしくみ

Windows Terminal は PowerShell、コマンドプロンプト、WSL などをタブで開けます。PowerShell 7 は別途入れると pwsh で起動できます。 :contentReference[oaicite:0]{index=0}


1. いちばん簡単な呼び出し方

Windowsキー + X でメニューを出して、Windows Terminal を選ぶ

方法1

Windowsキー + S を押して検索を開く

PowerShell と打つ

Enter

Windows のショートカットとして、Windowsキー + S は検索、Windowsキー + R は「ファイル名を指定して実行」を開きます。 :contentReference[oaicite:1]{index=1}

方法2

Windowsキー + R

powershell と入力

Enter

方法3

PowerShell 7 を入れているなら
Windowsキー + R

pwsh と入力

Enter

PowerShell 7 は、インストール後に pwsh コマンドまたはスタートメニューから起動できます。 :contentReference[oaicite:2]{index=2}


2. PowerShell 7 が入っていないとき

PowerShell 7 を入れるなら、公式では winget でのインストールが案内されています。

winget install --id Microsoft.PowerShell --source winget

インストール後は、スタートメニューから開くか、pwsh で起動できます。 (Microsoft Learn)


3. Windows Terminal を使う形にすると便利

Windows Terminal を既定のターミナルに設定すると、コマンドラインアプリを Terminal で開けます。さらに、既定プロファイルを PowerShell にすると、開いた瞬間に PowerShell が立ち上がります。 (Microsoft Learn)

設定の流れはこうです。

  1. Windows Terminal を開く
  2. Settings を開く
  3. Startup を開く
  4. Default terminal applicationWindows Terminal にする
  5. Default profilePowerShell にする (Microsoft Learn)

4. 開いたあとに最初にやること

まずは今どこにいるかと、何があるかを見るだけで十分です。

pwd
ls
  • pwd : 今いるフォルダを見る
  • ls : 中身を見る

PowerShell は計算、ファイル操作、プログラム実行、自動化に使えるシェルです。 (Microsoft Learn)


5. PowerShell でできること

5-1. 計算

式をそのまま打てます。

2 + 3
10 - 4
6 * 7
20 / 5
(2 + 3) * 4

5-2. 変数を使う

$a = 10
$b = 3
$a + $b
$a * $b

5-3. ファイルやフォルダを触る

cd Desktop
mkdir test
ni memo.txt
ls

5-4. プログラムを起動する

python --version
git --version
notepad
code .

5-5. スクリプト化して自動化する

$x = 12
$y = 8
$z = $x + $y
$z

PowerShell 7 は Windows 上で使えるコマンドライン環境で、インストール後は pwsh で起動でき、スクリプト実行や自動化にも使えます。Windows Terminal は複数タブ、複数ペイン、カスタム操作に対応しています。 (Microsoft Learn)


6. よく使うショートカット

Windows 側

Windows Terminal 側

  • Ctrl + Shift + T : 新しいタブ
  • Ctrl + Shift + P : コマンドパレット
  • Alt + Shift + + : 縦分割ペイン
  • Alt + Shift + - : 横分割ペイン
  • Alt + Shift + D : 今のプロファイルを複製したペイン
  • Ctrl + Tab : タブ切り替え
  • Ctrl + Shift + C : コピー
  • Ctrl + V / Ctrl + Shift + V / Shift + Insert : 貼り付け
  • Ctrl + Shift + F : 検索
  • Ctrl + Shift + A : すべて選択 (Microsoft Learn)

Windows Terminal のショートカットは変更できます。既定のショートカットが合わなければ、Settings や settings.json でカスタマイズできます。 (Microsoft Learn)


7. いちばん実用的な最短ルート

すぐ開く

Windowsキー + S

PowerShell

Enter (マイクロソフトサポート)

すぐ計算する

(12 + 8) * 3

すぐファイルを見る

pwd
ls

すぐフォルダ移動

cd Desktop

すぐ新しいタブ

Ctrl + Shift + T (Microsoft Learn)


8. 最初に覚えるコマンドだけ抜き出し

pwd
ls
cd Desktop
mkdir test
ni memo.txt
2 + 3
(5 + 7) * 2
$a = 10
$b = 4
$a / $b
python --version

9. 覚え方

  • 呼び出す
    Windowsキー + SPowerShell
  • 実行欄から呼ぶ
    Windowsキー + Rpowershell または pwsh
  • Terminal 内で増やす
    Ctrl + Shift + T
  • 操作を探す
    Ctrl + Shift + P (マイクロソフトサポート)
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?