示例代码:
确认credssp协议是否已配置
$credssp = (Get-WsManCredSSP -Role server) if($credssp.Enabled){ Write-Host "credssp is enabled" }else{ Write-Host "credssp is not enabled" }
启用credssp协议
Enable-WSManCredSSP -Role Server -Force
在Ansible Tower上使用credssp协议连接
ansible_connection: winrm ansible_winrm_transport: credssp ansible_winrm_server_cert_validation: ignore