Powershellの実行環境の取得
Powershellを実行する際には,まずこれでバージョンの確認を行うべきだと思います.
Powershellのバージョン関連の情報を得る.
この種の情報は$PSVersionTable
,もしくは,$Script:PSVersionTable
から取得できます.たとえば,
PS C:\Users\breez> $Script:PSVersionTable Name Value ---- ----- PSVersion 5.1.17763.316 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17763.316 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
私の今使っているPowershellのバージョンは 5.1 ですね.