PowerShell scripting best practices
Created by CodeCraft LLCWrite, advise on, and review PowerShell scripts, functions, and modules
Product and technology names are trademarks of their respective owners, used only to identify what this skill covers. CodeCraft LLC is not affiliated with or endorsed by them.
by Jace (@jamick)v1.5.2 · updated 2026-12-01Report copyright infringement
Description
Write, advise on, and review PowerShell scripts, functions, and modules — PowerShell 7 vs Windows PowerShell 5.1 differences, advanced functions ([CmdletBinding()], parameter validation, pipeline input), ShouldProcess/-WhatIf for destructive actions, error handling (terminating vs non-terminating, -ErrorAction Stop, try/catch), output streams, strict mode, paths and encoding, credentials/secrets, remoting, PSScriptAnalyzer, and Pester tests. Use whenever the user works with .ps1/.psm1/.psd1 files, asks for a Windows automation script, mentions PowerShell/pwsh, or needs a build/deploy/admin script on Windows — even a quick one-liner that will be saved and reused.
Included with all-access
$9.00 one-time, permanent access
or
Buy 2 or more together for up to 40% off · View cart
You get a licence, not ownership. Access lasts while this skill is available on AiSkillz; if it's removed within 90 days of purchase, we'll send you a copy to keep. Terms
Official and free skills are included with the all-access subscription
Changelog
Subscribers also see which files changed in each version.
v1.5.2Dec 1, 2026Latest
Changed
- README **Sources**: links now point at the publisher's openly licensed GitHub copy of the same docs (CC BY 4.0, Apache 2.0, MIT or the W3C Software and Document License), so the skill rests on the open license rather than the website's terms of use.
v1.5.1Dec 1, 2026
Added
- README: a **Sources** line listing the official pages the skill is written from, each link checked, so the source-overlap check can run against them.
v1.5.0Nov 29, 2026
Changed
- PowerShell 7.4 and 7.5 are now past end of support (2026-11-10); 7.6 LTS (latest 7.6.10) and 7.7 (released 2026-11-10 on .NET 11) are current. Added the 7.6 breaking changes. Logged .NET follow-up applied.
v1.4.0Nov 20, 2026
Added
- Review method: every code review starts by mapping the code flows in scope and gives each flow its own sub-agent at high effort, which reviews that flow end to end against this checklist; the main agent merges, re-checks Blockers and de-duplicates. Covers single-flow reviews, nested sub-agents, failed sub-agents and environments without sub-agents.
v1.3.0Nov 6, 2026
Changed
- Review report rule: reviews that cover changes (a diff, PR or uncommitted work) open with a short "What the changes do" section - factual bullets grouped by purpose, inferred intent marked, deploy or migration impact stated.
v1.2.0Nov 4, 2026
Changed
- Review report rule at the top of the skill, loaded before any review: one entry per finding as
Level · type · file:line · finding · proposed fix, outside facts sourced or marked unverified, and no narrative.
v1.1.0Oct 3, 2026
Changed
- Checked against the official documentation (October 2026).
- Added supported versions: PowerShell 7.6 LTS (to November 14, 2028); 7.4 LTS and 7.5 end of support November 10, 2026.
v1.0.1Oct 3, 2026
Changed
- Renamed the title to describe what the skill does with the product, so it doesn't read as an official or endorsed edition.
- Added a trademark notice to the README.
v1.0.0Oct 2, 2026
Added
- First release.