StefanScherer / packer-windows

Windows Templates for Packer: Windows 11, Windows 10, Windows Server 2022, 2019, 2016, also with Docker
MIT License
1.29k stars 434 forks source link

Cleanup winRM #249

Closed ghost closed 3 years ago

ghost commented 4 years ago

Hey Stefan,

Can you help me to understand how can I use winRM cleanup script in my packer manifest. I have a requirement to run both sysprep and winRM cleanup before packer completes the windows build. It seems like they both can't be achieved by packer because when I run sysprep and reboot the VM first, packer doesn't recognize its winRM connection and ends up failing that it earlier connection was closed forcefully . If I run winRM cleanup first and I can't run any commands since packer uses winRM .

StefanScherer commented 3 years ago

Hm, I don't have an idea for that.