Azure sysprep image not accepting winrm

Has anyone ever come across and issue where , after the VM has been configured for winrm and then you sysprep your VM in azure using the generalize option, shutdown and then capture using azure, ansible won’t connect to it?

It deploys the image, but when my playbook calls for OS configuration changes, winrm just can’t connect to the VM in azure.

But I can rdp onto the VM, and after I rerun the same winrm power shell script to configure winrm on the VM, ansible connects to it immediately.

It’s like either sysprep or azure capture is breaking the winrm config during the process.

Any idea or suggestions on how to fix this?

Must say that I am prepping windows 2012R2 Dc image in Azure.