What problem does it solve? Legacy PowerShell 5.1 scripts use verbose if/else blocks, manual null checks, and sequential processing that miss the performance and readability gains available in PowerShell 7+. This Skill systematically transforms that legacy code into modern syntax without changing behavior. ## Core Features & Use Cases - Syntax Modernization: Converts verbose if/else assignments to ternary operators, null checks to null coalescing (??, ??=), and sequential command flows to pipeline chains (&&, ||). - Performance Upgrades: Adds ForEach-Object -Parallel with throttle limits for I/O-bound operations and cross-platform path handling using Join-Path and automatic variables like $IsWindows. - Validation Workflow: Verifies modernized scripts with PSParser tokenization, PSScriptAnalyzer, and behavior comparison against the original. - Use Case: You inherit a server-monitoring script written for Windows PowerShell 5.1. Use this Skill to rewrite it with parallel connection testing, ternary status assignments, and cross-platform log paths, then validate the output matches the original. ## Quick Start Modernize the attached LegacyScript.ps1 to PowerShell 7+ syntax and verify the behavior matches the original.