PowerShell + VS Code Starter Repos with Git, Debug, and Linting
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
Recommended VS Code extensions
- 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
- Download a ZIP from
/assets/and extract it. - Open in VS Code (
code .). - Run:
pwsh -NoProfile -Command "Install-Module PSScriptAnalyzer,Pester -Scope CurrentUser -Force" - Run tests:
Invoke-Pester -Path tests -Output Detailed - 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 | Β |
π¦ Download Links
Created November 2025 by Preston Powell β a complete PowerShell + VS Code development foundation.