把分散在 unattend.xml inline 的網路相依步驟(OpenSSH/Telegram/RemoveAI)和 新加入的 10 個 post-install 動作整合進獨立的 Setup.ps1,由 FirstLogonCommands Order 4 從 Ventoy USB(/ventoy/script/Setup.ps1)掃磁碟複製到 C:\Scripts\, Order 5 執行。腳本分兩 phase: Phase 1(不需網路):SSH 22 防火牆、RDP+3389、ICMP Echo、WinRM TrustedHosts=*、 移 OneDrive、關 Cortana/WebSearch、套 UI/IME 預設到 Default profile、user→User 改名 + 從登入畫面隱藏 Admin。 Phase 2(要網路,wait-network 後):OpenSSH Server FoD、KMS 啟用(先試 $InternalKmsServers 後 fallback 公開 KMS)、winget Chrome、RemoveWindowsAI、 Win11Debloat、22 個 UWP 移除、Telegram、刪 Panther 殘留。 每段以 Section 包裝寫獨立 START/DONE/ERR 到 C:\Windows\Temp\setup.log,方便逐段 重跑與排查。 文件全部同步:DEPLOY/QUICKSTART/SUMMARY/README/CLAUDE 都加上 Setup.ps1 的 USB 部署、cp 步驟、Order 表、排查指引。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
15 KiB
15 KiB