2 minute read

Overview

Here are two ready-to-clone PowerShell development starters for Windows 11 and VS Code.
Both include Git integration, PSScriptAnalyzer, Pester, and pre-wired debugging configurations.

Type Download Description
Module Scaffold PowerShellModuleStarter-PrestonPowell.zip Full PowerShell module structure with manifest (.psd1, .psm1), public/ and private/ folders, and tests.
Scripts-Only Scaffold PowerShellScriptsStarter-PrestonPowell.zip Lightweight script workspace β€” no module manifest, perfect for utilities and admin scripts.

βš™οΈ VS Code + PowerShell Setup

Install the essentials

# PowerShell 7
winget install --id Microsoft.Powershell --source winget

# Git for Windows
winget install --id Git.Git --source winget

# VS Code
winget install --id Microsoft.VisualStudioCode --source winget
  • PowerShell (Microsoft) – language service, IntelliSense, debugger
  • GitLens – blame annotations, hovers, CodeLens, and repo history
  • Pester Test Explorer – test runner integration
  • (Optional) Markdown All in One and EditorConfig

🧠 Git Configuration

git config --global user.name  "Preston Powell"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main
git config --global core.autocrlf true

Generate an SSH key for GitHub:

ssh-keygen -t ed25519 -C "you@example.com"
type $env:USERPROFILE\.ssh\id_ed25519.pub

Add the printed key under GitHub β†’ Settings β†’ SSH and GPG keys.


🧩 PowerShell Developer Modules

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force
Install-Module PSScriptAnalyzer -Scope CurrentUser -Force
Install-Module Pester -Scope CurrentUser -Force
Install-Module PSReadLine -Scope CurrentUser -Force

🧱 Project Structure (Module Version)

MyPowerShellProject/
β”œβ”€ .vscode/
β”‚  β”œβ”€ launch.json
β”‚  └─ tasks.json
β”œβ”€ src/
β”‚  β”œβ”€ MyModule.psd1
β”‚  β”œβ”€ MyModule.psm1
β”‚  β”œβ”€ public/
β”‚  β”‚  └─ Get-Greeting.ps1
β”‚  └─ private/
β”œβ”€ tests/
β”‚  └─ MyModule.Tests.ps1
β”œβ”€ PSScriptAnalyzerSettings.psd1
β”œβ”€ .editorconfig
β”œβ”€ .gitattributes
β”œβ”€ .gitignore
└─ README.md

Run tests:

Invoke-Pester -Path tests -Output Detailed

🧭 In-Editor Intelligence

Blame annotations (GitLens)
β†’ See who changed each line and when (Ctrl+Shift+P β†’ GitLens: Toggle Line Blame).

Hover tooltips
β†’ Hover a symbol for PowerShell docs, or a line for Git commit info.

CodeLens
β†’ Inline annotations above functions showing references, tests, and authorship.

Inline diff / history
β†’ Alt+L shows line history; Alt+D shows diff with previous revision.


🧰 Key VS Code Settings

{
  "powershell.powerShellDefaultVersion": "PowerShell",
  "powershell.codeLens.enable": true,
  "powershell.scriptAnalysis.enable": true,
  "gitlens.currentLine.enabled": true,
  "gitlens.lineBlame.annotations.enabled": true,
  "editor.formatOnSave": true,
  "editor.renderLineHighlight": "gutter",
  "files.eol": "\r\n"
}

πŸš€ Quick Start

  1. Download a ZIP from /assets/ and extract it.
  2. Open in VS Code (code .).
  3. Run:
    pwsh -NoProfile -Command "Install-Module PSScriptAnalyzer,Pester -Scope CurrentUser -Force"
    
  4. Run tests:
    Invoke-Pester -Path tests -Output Detailed
    
  5. Optionally initialize Git:
    .\bootstrap.ps1 -UserName "Preston Powell" -UserEmail "you@example.com"
    

πŸͺͺ Signing Commits (Optional)

Generate a GPG key:

gpg --full-generate-key
gpg --list-secret-keys --keyid-format LONG
git config --global user.signingkey <KEYID>
git config --global commit.gpgsign true

Export public key for GitHub:

gpg --armor --export you@example.com

βœ… Daily Workflow

Task Command Shortcut
Run current script F5 Debug start
Toggle blame Ctrl + Shift + P β†’ GitLens Β 
Run tests Ctrl + Shift +B Β 
Format code Ctrl + S (auto) or β€œFormat task” Β 
Commit & push Source Control panel Β 


Created November 2025 by Preston Powell β€” a complete PowerShell + VS Code development foundation.