# Windows Terminal + PowerShell 7: a clean, repeatable setup

> Install Windows Terminal and PowerShell 7 side by side, set a sane default profile, font and settings.json, and avoid profile scripts you do not understand.

**Tested on**

- Build: 26300.9457
- Edition: Pro (26H2)
- Architecture: x64
- Evidence: E1
- Verified: 2026-10-28

## The short answer

Install **Windows Terminal** for the window and **PowerShell 7** for the shell. They are separate products and can coexist with Windows PowerShell 5.1.

Use a small `settings.json`, set PowerShell 7 as the default profile, pick a monospace font with ligatures only if you like them, and keep profile scripts minimal. A terminal setup is not a security boundary; do not run a profile you copied from a random gist.

## Install

```powershell
winget install --id Microsoft.WindowsTerminal -e
winget install --id Microsoft.PowerShell -e
```

Or use the Microsoft Store/MSI. After install:

```powershell
pwsh -NoLogo
$PSVersionTable
```

`pwsh.exe` is PowerShell 7; `powershell.exe` is Windows PowerShell 5.1. Keep both: some old modules only work in 5.1.

## Set the default profile

Windows Terminal → **Settings → Startup → Default profile → PowerShell 7**. You can also set the default terminal application in Windows Settings → System → For developers → Terminal.

Profiles are generated; do not hand-edit the generated GUID blocks unless you need a custom profile. Use the Settings UI for fonts and colors if you are not comfortable with JSON.

## A minimal settings.json

The file lives at `%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json` for the Store build. A minimal change:

```json
{
  "defaultProfile": "{GUID-of-PowerShell-7}",
  "profiles": {
    "defaults": {
      "font": { "face": "Cascadia Mono", "size": 11 },
      "opacity": 95
    }
  }
}
```

Do not delete the generated profiles or the `schemes` array. Back up the file before editing; a malformed JSON file can make Terminal fail to start.

## Profile scripts

PowerShell profiles run on every shell start. Keep them small and auditable:

```powershell
$PROFILE.CurrentUserAllHosts
Test-Path $PROFILE.CurrentUserAllHosts
```

If you use a prompt theme or module, install it from a known source and pin the version. A profile that downloads and executes code at startup is a supply-chain risk.

## Execution policy

Do not set `Unrestricted` or `Bypass` machine-wide. Prefer:

```powershell
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
```

Sign your own scripts if you run them regularly. Execution policy is not a security sandbox; it is a guardrail.

## A sane baseline

- PowerShell 7 default; Windows PowerShell 5.1 available for legacy modules.
- Cascadia Mono or another readable monospace; no tiny 8pt fonts.
- Minimal profile; no network calls at startup.
- `winget` and Git available in PATH.
- Windows Terminal pinned to taskbar; use `wt` to launch.

> **Caution: Do not paste unknown profile code**
>
> A PowerShell profile runs with your user rights every time you open a shell. Treat a copied profile like a script from a stranger: read it, or do not run it.

## Sources

- [Microsoft — Windows Terminal](https://learn.microsoft.com/en-us/windows/terminal/)
- [Microsoft — Install PowerShell on Windows](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows)
- [Microsoft — about_Profiles](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles)

---

Source: https://winbook.fyi/en/windows/dev/terminal/
