動作環境
エディション | Windows 11 Home |
バージョン | 21H2 |
VMware | VMware Workstation 16 Player |
PowerShellが古いためインストールを求められた
おそらくWindows10からWindows11へのOSアップデートの影響で以下のメッセージが。。。

最新のPowerShellをインストールする
最新のPowerShellをインストールする方法は以下のURLとなります

Windows への PowerShell のインストール - PowerShell
Windows への PowerShell のインストールに関する情報
方法たくさんありますが、推奨しているインストール方法で行います
Winget を使用して PowerShell をインストールする (推奨)
https://learn.microsoft.com/ja-jp/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.3#winget
最新バージョンの PowerShell を検索
winget search Microsoft.PowerShell
規約条件に同意する「y」を入力

id パラメーターを使用して PowerShellをインストール
winget install --id Microsoft.Powershell --source winget

無事にインストール完了しました
PowerShellの起動確認
PowerShellのコマンドについて
PowerShell5を起動
PowerShell
PowerShell7を起動
PwSh
PowerShellのversionを調べる
$PSVersionTable
PowerShell5
PowerShell
$PSVersionTable

PowerShell7
PwSh
$PSVersionTable
