Windows Shell Reliability Patterns Best practices for running commands on Windows via PowerShell and CMD. When to Use Use this skill when developing or debugging scripts and automation that run on Windows systems, especially when involving file paths, character encoding, or standard CLI tools. --- 1. Encoding & Redirection CRITICAL: Redirection Differences Across PowerShell Versions Older Windows PowerShell releases can rewrite native-command output in ways that break later processing. PowerShell 7.4+ preserves the byte stream when redirecting stdout, so only apply the UTF-8 conversion workar…