
Powershell Windows
If you've ever hit "unexpected token 'or'" in PowerShell and wondered why your perfectly reasonable if statement exploded, this is your cheat sheet. It covers the specific syntax gotchas that trip people up: why you need double parentheses around cmdlets in logical operators, why emoji will break your scripts, how to avoid null reference errors on arrays, and why ConvertTo-Json without a depth parameter will silently truncate your data. The quick reference tables are the real value here. Think of it as documentation for the parts of PowerShell that don't work the way you'd expect coming from other scripting languages.
- skills.sh installs
- 2.2K
- GitHub stars
- 43.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add sickn33/antigravity-awesome-skills --skill powershell-windows --agent claude-codeInstalls into .claude/skills of the current project.
Files
PowerShell Windows Patterns
Critical patterns and pitfalls for Windows PowerShell.
1. Operator Syntax Rules
CRITICAL: Parentheses Required
| ❌ Wrong | ✅ Correct |
|---|---|
if (Test-Path "a" -or Test-Path "b") | if ((Test-Path "a") -or (Test-Path "b")) |
if (Get-Item $x -and $y -eq 5) | if ((Get-Item $x) -and ($y -eq 5)) |
Rule: Each cmdlet call MUST be in parentheses when using logical operators.
2. Encoding Compatibility
Prefer portable log markers
| Purpose | ❌ Don't Use | ✅ Use |
|---|---|---|
| Success | ✅ ✓ | [OK] [+] |
| Error | ❌ ✗ 🔴 | [!] [X] |
| Warning | ⚠️ 🟡 | [*] [WARN] |
| Info | ℹ️ 🔵 | [i] [INFO] |
| Progress | ⏳ | [...] |
PowerShell supports Unicode. ASCII log markers are a portability choice, not a syntax requirement. For non-ASCII scripts read by Windows PowerShell 5.1, use UTF-8 with BOM; PowerShell 7 uses UTF-8 without BOM by default. Check the consuming tool before choosing file encoding.
3. Null Check Patterns
Always Check Before Access
Sponsors
Details
More from sickn33/antigravity-awesome-skills
All 708- Brainstorming2K
- Api Documentation Generator1.9K
- Frontend Design1.9K
- Senior Architect1.9K
- Cc Skill Security Review1.8K
- Senior Fullstack1.8K
- Agent Memory Systems1.7K
- Database Design1.7K
- Scroll Experience1.6K
- Shopify Development1.6K
- Youtube Summarizer1.6K
- App Store Optimization1.5K
- Backend Dev Guidelines1.5K
- Bash Linux1.5K
- Bullmq Specialist1.5K
- Cc Skill Security Review1.5K
- Vercel Deployment1.5K
- Bash Scripting1.4K
- Browser Extension Builder1.4K
- Documentation Templates1.4K
- Prompt Engineer1.4K
- Aws Serverless1.3K
- Backend Architect1.3K
- Conversation Memory1.3K