ansible 管控 windows
winrm enumerate winrm/config/listener
winrm quickconfig
winrm e winrm/config/listener
winrm set winrm/config/service/auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
# check powershell version
Get-Host
# winrm enable
Enable-PSRemoting
# winrm
winrm quickconfig
winrm enumerate winrm/config/listener
winrm set winrm/config/service/auth '@{Basic="true"}'
winrm set winrm/config/service '{AllowUncrypted="true"}'
winrm set winrm/config/Client '@{TrustedHosts="*"}'
winrm set winrm/config/Client/Auth '@{Basic="true"}'
winrm create winrm/config/listener?IPaddress=*+Transport=HTTP
192.168.1.2 ansible_ssh_user=administrator ansible_ssh_pass="111" ansible_ssh_port=5985 ansible_connection="winrm"
reference
WARNING: No any other purpose,keeping reminded! So sorry to offended,if necessary, contact me and I do change what I had done to protect your privileges!