I'd like to use Ansible to manage Windows machines at work,
thus here are two new ports - pywinrm (python module for
Windows Remote Management) and its dependent, py-xmltodict.
Example tests work ok.
j.
~~~
In [5]: s = winrm.Session('ad-w2k12r2.example.com', auth=('Administrator',
'password'))
In [6]: r = s.run_cmd('ipconfig', ['/all'])
In [7]: r.status_code
Out[7]: 0
In [8]: r.std_out
Out[8]: '\r\nWindows IP Configuration\r\n\r\n Host Name . . . . . . . . . . .
. : brq-w2k12r2\r\n Primary Dns Suffix . . . . . . . :
ad-w2k12r2.example.com\r\n Node Type . . . . . . . . . . . . : Hybrid\r\n
IP Routing Enabled. . . . . . . . : No\r\n WINS Proxy Enabled. . . . . . . .
: No\r\n DNS Suffix Search List. . . . . . :
ad-w2k12r2.example.com\r\n\r\nEthernet adapter Ethernet:\r\n\r\n
Connection-specific DNS Suffix . : \r\n Description . . . . . . . . . . . :
Red Hat VirtIO Ethernet Adapter\r\n Physical Address. . . . . . . . . :
00-1A-4A-01-3F-FB\r\n DHCP Enabled. . . . . . . . . . . : No\r\n
Autoconfiguration Enabled . . . . : Yes\r\n IPv4 Address. . . . . . . . . . .
: 10.34.63.245(Preferred) \r\n Subnet Mask . . . . . . . . . . . :
255.255.252.0\r\n Default Gateway . . . . . . . . . : 10.34.63.254\r\n DNS
Servers . . . . . . . . . . . : 127.0.0.1\r\n NetBIOS over Tcpip. . . . . . .
. : Enabled\r\n\r\nTunnel adapter Teredo Tunneling Pseudo-Interface:\r\n\r\n
Media State . . . . . . . . . . . : Media disconnected\r\n
Connection-specific DNS Suffix . : \r\n Description . . . . . . . . . . . :
Teredo Tunneling Pseudo-Interface\r\n Physical Address. . . . . . . . . :
00-00-00-00-00-00-00-E0\r\n DHCP Enabled. . . . . . . . . . . : No\r\n
Autoconfiguration Enabled . . . . : Yes\r\n\r\nTunnel adapter
isatap.{8E0EBBF3-CDFB-44DE-B6C7-CD12C5B14CBD}:\r\n\r\n Media State . . . . .
. . . . . . : Media disconnected\r\n Connection-specific DNS Suffix . : \r\n
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2\r\n
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0\r\n DHCP Enabled.
. . . . . . . . . . : No\r\n Autoconfiguration Enabled . . . . : Yes\r\n'
~~~