Lightweight Windows Vagrant Boxes with Packer
summary
Step-by-step recipe for creating a compact, fully patched Windows Vagrant box with Packer: boot an evaluation ISO with an autoattend.xml that drops a PowerShell preprovisioner to enable WinRM, use a scheduled task elevation trick to run Windows Update reliably over WinRM, run DISM to clean the SxS component store (biggest single win), remove unused Features on Demand, zero unused disk space and run Optimize-Volume, and undo insecure WinRM before packaging; note builds with ~235 updates can take ~10 hours on modest hardware.
AI-written summary · about
