How to bootstrap/enable/configure WinRM on Azure Arm builds

I’ve been googling for hours trying to resolve the (what seems like) common problem of WinRM not being enabled:

==> azure-arm.temp: Waiting for WinRM to become available…
==> azure-arm.temp: Timeout waiting for WinRM.

Does anyone have tips for getting this to work? Is it a firewall issue and I need to run a floppy_file or something? Why isn’t there more documentation in the arm section of the docs with regards to configuring WinRM? Is there some way to debug why WinRM isn’t being configured or what an error might be?

Open 5985 and 5986 port in firewall and try.
also refer this