mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-26 05:29:43 +00:00
1.0 KiB
1.0 KiB
Lessons Learned
Rules
Code Style
Architecture
Testing
Common Mistakes
PowerShell scripts deployed via Intune MUST be pure ASCII (2026-03-30)
What went wrong: Em-dash characters — (U+2014) and Unicode symbols (✓, →, ✗) in Bootstrap .ps1 scripts caused cascading PowerShell parse errors in production. The IME (Intune Management Extension) uses PowerShell 5.1 which reads scripts without BOM as ANSI — multi-byte UTF-8 chars get corrupted.
Rule: ALL .ps1 files under scripts/Bootstrap/ (and any other scripts deployed via Intune) MUST contain only ASCII characters (0x00-0x7F). No em-dashes, no Unicode symbols, no special quotes. Use - instead of —, [OK] instead of ✓, etc.
How to check: LC_ALL=en_US.UTF-8 grep -Pn '[^\x00-\x7F]' <file> — must return no matches.
Severity: PRODUCTION BREAKING — agent installation fails completely on all devices.