Windows PowerShell Core Bootstrapper
A script to install and configure a Windows PowerShell Core environment powered by Oh My Posh, for use in Windows Terminal.
Designed to be largely non-opinionated, non-clobbering, and repeatable.
Utilises the Windows Package Manager over other third-party options for lightweight and as-native application installation.
The script can be invoked remotely with defaults via the following command:
irm "jacobjmarks.dev/pwsh/up" | iexjacobjmarks.dev/pwsh/up is a link which fetches the bootstrap.ps1 script, deployed via GitHub Pages.
For advanced usage scenarios and customisation, download the script and utilise the available CLI arguments:
irm "jacobjmarks.dev/pwsh/up" -OutFile bootstrap.ps1
Get-Help -Detailed .\bootstrap.ps1| Parameter | Type | Description | Default |
|---|---|---|---|
-Theme |
string |
Oh My Posh theme to configure for use | "paradox" |
-NerdFont |
string |
Nerd Font to install. | "Hack" |
-NoFonts |
switch |
Skip installation of fonts | $false |
Once the bootstrapping script has been run, the following Windows Terminal configuration is recommended.
At a minimum, you should configure your Terminal to utilise a Nerd Font, presumably the one that was installed via the bootstrapping script.
| Setting | Value |
|---|---|
| Startup > Default profile | PowerShell |
| Startup > Default terminal application | Windows Terminal |
| Appearance > Application Theme | Dark |
| Appearance > Use acrylic material in the tab row | true |
| Rendering > Use the new text renderer ("AtlasEngine") | true |
| Profiles: Defaults > Additional settings: Appearance > Text: Color scheme | One Half Dark |
| Profiles: Defaults > Additional settings: Appearance > Text: Font face | Hack Nerd Font |
| Profiles: Defaults > Additional settings: Appearance > Transparency: Background opacity | 75% |
| Profiles: Defaults > Additional settings: Appearance > Transparency: Enable acrylic material | true |
The script installs/updates the following components (unless otherwise stated):
- Windows Terminal (does not update)
- PowerShell Core (does not update)
- Git
-
gsudo
Asudoequivalent for Windows. -
Oh My Posh (via Microsoft Store)
A prompt theme engine for any shell. -
Terminal-Icons
Shows file and folder icons in the terminal. -
posh-git
Provides Git status information to the prompt. -
z
Directory jumper.
- How to set up PowerShell prompt with Oh My Posh on Windows 11 by @devaslife | YouTube
- Tutorial: Set up a custom prompt for PowerShell or WSL with Oh My Posh | Microsoft Learn
While not installed via the bootstrapping script, you may find some additional useful components below.
7-Zip is a file archiver with a high compression ratio.
winget install -e --id 7zip.7zipThe Azure command-line interface (Azure CLI) is a set of commands used to create and manage Azure resources.
winget install -e --id Microsoft.AzureCLIThe Azure Functions Core Tools provide a local development experience for creating, developing, testing, running, and debugging Azure Functions.
winget install -e --id Microsoft.AzureFunctionsCoreToolsThe Microsoft/npm/Google recommended Node.js version manager for Windows.
winget install -e --id CoreyButler.NVMforWindows