Skip to content

Instantly share code, notes, and snippets.

@demiters
Last active August 31, 2020 08:25
Show Gist options
  • Save demiters/f6903fc764771ff972513a02ab5ea0a3 to your computer and use it in GitHub Desktop.
Save demiters/f6903fc764771ff972513a02ab5ea0a3 to your computer and use it in GitHub Desktop.
PowerShell script that configures WinRM for use with Ansible
$url = "https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1"
$file = "$env:temp\ConfigureRemotingForAnsible.ps1"
(New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file)
powershell.exe -ExecutionPolicy ByPass -File $file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment