powershell-7

Apply PowerShell 7 best practices to scripts, modules, and tests.

1|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/darkglow-net/github-copilot-kickstarter --skill powershell-7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: powershell-7
Source: https://github.com/darkglow-net/github-copilot-kickstarter/tree/main/skills/powershell-7
Command: npx skills add https://github.com/darkglow-net/github-copilot-kickstarter --skill powershell-7

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PowerShell 7 development often suffers from inconsistent patterns, scattered best practices, and cross-platform friction. This Skill consolidates proven guidance for function templates, error handling, performance, platform differences, module development, and testing to speed up robust PowerShell work.

Core Features & Use Cases

  • Provides a comprehensive baseline of PowerShell 7 patterns for writing reliable functions, modules, and Pester tests.
  • Includes guidance on cross-platform path handling, typed exceptions, performance optimizations, security considerations, and ShouldProcess patterns to prevent destructive actions.
  • Use Case: migrate PowerShell 5.1 code to PowerShell 7 with ready templates, references, and migration checks.

Quick Start

Set up or reference this Skill in your Copilot workspace and follow the PowerShell 7 guidelines when scaffolding new scripts.

Frequently Asked Questions about powershell-7

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write cross-platform PowerShell 7 scripts that work on Linux and macOS?

Cross-platform PowerShell 7 scripts require consistent path handling and platform-aware patterns. This Skill provides templates and references that enforce cross-platform compatibility, ensuring your modules and functions run reliably across Windows, Linux, and macOS.

What are the best practices for PowerShell 7 module development and error handling?

PowerShell 7 module best practices include using CmdletBinding, output type hints, parameter validation, and typed exceptions. This Skill consolidates these patterns to help you build robust, security-conscious modules with proper ShouldProcess support to prevent destructive actions.

How do I migrate PowerShell 5.1 scripts to PowerShell 7?

Migrating PowerShell 5.1 scripts to PowerShell 7 involves checking cross-platform path handling, updating error patterns, and applying CmdletBinding. This Skill offers ready templates, references, and migration checks to speed up the transition to reliable PowerShell 7 code.

Does Pester testing work with PowerShell 7 modules and functions?

Pester testing integrates seamlessly with PowerShell 7 modules when following proper guidelines. This Skill includes Pester testing references and templates that align with module-friendly approaches, parameter validation, and typed exception patterns to ensure comprehensive test coverage.

Why should I use ShouldProcess patterns in PowerShell 7 scripts?

ShouldProcess patterns in PowerShell 7 scripts prevent destructive actions by prompting for confirmation before execution. This Skill enforces security-conscious patterns through bundled references, ensuring your functions handle destructive operations safely and predictably across all platforms.

Can PSScriptAnalyzer help enforce PowerShell 7 best practices?

PSScriptAnalyzer validates PowerShell 7 scripts against best practices for module development, testing, and performance. This Skill provides the baseline rules and templates that align with PSScriptAnalyzer checks, ensuring consistent code quality and reliable function patterns.