KOKOCAL SCRIPT

Guide

How to Install PowerShell 7 on Windows

Some KOKOCAL SCRIPT local AI setup steps use PowerShell for Ollama and environment variables. This guide explains the difference between built-in Windows PowerShell 5.1 and separately installed PowerShell 7, then walks through installation and verification commands.

Separate from built-in Windows PowerShell

PowerShell 7 does not replace Windows PowerShell 5.1. It runs side by side.

WinGet or MSI is enough

Usually, choose either WinGet or the MSI installer. You do not need to use every method.

The command is pwsh

Use pwsh when you want to start PowerShell 7 from a terminal.

Before installing

Many Windows environments already include Windows PowerShell 5.1. PowerShell 7, the current cross-platform PowerShell provided by Microsoft, is installed separately when needed.

Installing PowerShell 7 does not remove Windows PowerShell 5.1. In the Start menu and terminal apps, you can launch Windows PowerShell and PowerShell 7 separately.

For many KOKOCAL SCRIPT setup commands, the built-in Windows PowerShell is enough. Installing PowerShell 7 is still useful if you want a modern command environment for future setup work.

Choose an installation method

There are several installation methods, but you only need one on the same PC. Choose the method that fits your environment.

Personal use on Windows 11

Start with WinGet. It makes installation, updates, and removal easy from the command line.

If you prefer an installer

Use the MSI installer. It follows a familiar installation screen, so it is easier if you are not comfortable with commands.

If you want Microsoft Store

The Store package is also available and can be convenient for automatic updates, though some managed environments may restrict it.

Installation methods

Choose one method below. You do not need to run both WinGet and MSI. After installation, open a new terminal window and verify the installation.

Install with WinGet

Official page

If winget is available, such as on Windows 11, this is usually the easiest command-based method. Running the command installs the latest stable PowerShell package.

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

Install with the MSI installer

Official page

Use the MSI package when you prefer an installer flow or need an enterprise-friendly deployment path. Download the latest MSI from the official page and run it.

Install from Microsoft Store

Official page

You can also install PowerShell from Microsoft Store. It is convenient for personal use and supports automatic updates, but check the official notes because some limitations may apply.

Verify installation

After installing PowerShell 7, open a new Windows Terminal, PowerShell, or Command Prompt window and run these checks.

Start PowerShell 7

pwsh

Check the PowerShell 7 version

pwsh -v

Check details for the current PowerShell session

$PSVersionTable.PSVersion

Find where pwsh is installed

where.exe pwsh

Update and uninstall

If you installed with WinGet, you can also update or uninstall PowerShell with commands. For MSI or Store installs, follow the matching management screen or official instructions.

Update PowerShell

Updates PowerShell installed through WinGet.

winget upgrade --id Microsoft.PowerShell --source winget

Uninstall PowerShell

Uninstalls PowerShell installed through WinGet. Run only if you need to remove it.

winget uninstall --id Microsoft.PowerShell --source winget

Official resources

PowerShell installation methods and package types can change. Check Microsoft official resources for the latest information.