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.
PowerShell 7 does not replace Windows PowerShell 5.1. It runs side by side.
Usually, choose either WinGet or the MSI installer. You do not need to use every method.
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 pageIf 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 wingetInstall with the MSI installer
Official pageUse 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 pageYou 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
pwshCheck the PowerShell 7 version
pwsh -vCheck details for the current PowerShell session
$PSVersionTable.PSVersionFind where pwsh is installed
where.exe pwshUpdate 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 wingetUninstall PowerShell
Uninstalls PowerShell installed through WinGet. Run only if you need to remove it.
winget uninstall --id Microsoft.PowerShell --source wingetOfficial resources
PowerShell installation methods and package types can change. Check Microsoft official resources for the latest information.
Guide
Related Guides
After PowerShell is ready, review Ollama and local AI assistant setup.
Ollama and Recommended Model Installation Guide
Install Ollama and the recommended local AI models.
Google Sheets Local AI Assistant Guide
Review the connection, question mode, AI processing, and formula creation workflow.
Apps Script Basics Guide
Review the basic steps for pasting generated code into Apps Script.