LoginSignup
2
1

PowerShell5から7にアップデートする。

Posted at

基本的にはここに乗っている手順でアップデートした結果を書いています。
最新は公式ドキュメントを参照してください。

アップデート方法

# インストールできるPowerShellの確認

PS C:\Users\masas> winget search Microsoft.PowerShell
名前               ID                           バージョン ソース
------------------------------------------------------------------
PowerShell         Microsoft.PowerShell         7.4.1.0    winget
PowerShell Preview Microsoft.PowerShell.Preview 7.5.0.2    winget

# インストールの実行
winget install --id Microsoft.Powershell --source winget

# パスの追加
$Env:Path += ';$env:ProgramFiles\PowerShell\7'

ターミナルアプリからPowerShellが起動できればOK

image.png

補足

  • PowerShell5までは「Windows PowerShell」という名称のアプリになっていてPowerShell7はWindowsという単語が消えているので別物らしい

  • Microsoft StoreやMSIインストーラ形式でも配布しているので、コマンド形式に慣れていない人はインストーラからインストールするとよいかもしれない

2
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
2
1