WinRM (Windows Remote Management) lets us manage a Windows box remotely. The WinRM service is already installed and running on Windows Server 2008+.
However, no WinRM listener is configured (see Microsoft's article on WinRM configuration).
On the box over Remote Desktop (sadly), open a cmd prompt/powershell and run
winrm quickconfig
Example run:
PS C:\Users\Administrator> winrm quickconfig
WinRM service is already running on this machine.
WinRM is not set up to allow remote access to this machine for management.
The following changes must be made:
Enable the WinRM firewall exception.
Make these changes [y/n]? y
WinRM has been updated for remote management.
WinRM firewall exception enabled.
winrm quickconfig -transport:https
At least for now, the only way I'm seeing to boostrap this is to setup a machine with the winrm enabled and create an image out of that.
import winrm
s = winrm.Session("162.209.125.52", auth=("Administrator", "thisisnotthepassword"))
r = s.run_cmd("ipconfig", ['/all'])
salt-cloud doesn't have a bootstrap script for Windows (yet), and libcloud needs a way to run scripts in Windows (Powershell, please).