Best method for clearing windows static ip packer

Hi All. I have an environment that I need to use a static IP during provisioning. This is fine as I achieve this via the autounattend.xml. However I want to clean this up as a last step before finalizing. If I do it as a powershell provisoner packer will loose winrm connection to the vm. Has anyone been able to achieve this? Maybe sysprep is the best method?