ansible 管控 windows

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

posted @ 2021-09-04 21:03  素丶素  阅读(102)  评论(0编辑  收藏  举报