Установка PowerShell

Содержание
Проверка версии
Установка
Похожие статьи

Проверка версии

$PSVersionTable

Name Value ---- ----- PSVersion 5.1.19041.2364 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.2364 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

Установка PowerShell

Может пригодиться для обновления до более свежей версии.

С помощью winget. Сперва рекомендуется проверить доступные версии

winget search Microsoft.PowerShell

The `msstore` source requires that you view the following agreements before using. Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US"). Do you agree to all the source agreements terms? [Y] Yes [N] No: Y Name Id Version Source ------------------------------------------------------- PowerShell Microsoft.PowerShell 7.3.3.0 winget PowerShell Microsoft.PowerShell.Preview 7.4.1.0 winget

Непосредственно установка

winget install --id Microsoft.Powershell --source winget

Found PowerShell [Microsoft.PowerShell] Version 7.3.3.0 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.3.3/PowerShell-7.3.3-win-x64.msi ██████████████████████████████ 101 MB / 101 MB Successfully verified installer hash Starting package install... Successfully installed

PowerShell 7 установится не на замену обычному Windows PowerShell, а как дополнительный софт.

Чтобы зайти в него нужно ввести в поиск PowerShell 7

Проверка версии, обычно не нужна, так как версия показана перед первым приглашением командной строки. Тем не менее можно выполнить стандартную команду

$PSVersionTable

Name Value ---- ----- PSVersion 7.3.3 PSEdition Core GitCommitId 7.3.3 OS Microsoft Windows 10.0.19045 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0