mirror of
https://github.com/MengMengCode/CLICD.git
synced 2026-08-05 05:36:07 +08:00
57d6b19c05
The unattend FirstLogonCommands runs via 'cmd.exe /c' (command-line context), where a FOR loop variable must be %d, not the batch-file form %%d. The %%d form raised '%%d was unexpected at this time', so the else branch that locates and runs FirstLogon.ps1 from the unattend ISO never executed. Combined with $OEM$ not being processed from a separate ISO (so C:\CLICD\FirstLogon.ps1 is never staged), the entire Windows post-install init was skipped: RDP was never enabled, the firewall was never opened, and the network profile stayed Public, so the guest dropped all inbound traffic. The host NAT DNAT for 3389 was correct, but the guest silently dropped it, making the mapping appear to have no effect.