Every now and then we do have to use windows. So let’s try to make it as Linux like as possible
Enabling WinRM As Ansible leverages WinRM for managing Windows servers, it’s guide below provides a lot of helpful guidance:
The TL;DR is to use the following snippet below to run a powershell script that will correctly enable WinRM for the system:
$url = "https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1" $file = "$env:temp\ConfigureRemotingForAnsible.ps1" (New-Object -TypeName System.