Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@deekayen
Created July 20, 2018 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deekayen/5de1f7ff233387ceb17976f4211c39a2 to your computer and use it in GitHub Desktop.
Save deekayen/5de1f7ff233387ceb17976f4211c39a2 to your computer and use it in GitHub Desktop.
Run Once: Start WinRM for Ansible to connect to Windows
powershell.exe -Command "& {[Net.ServicePointManager]::SecurityProtocol = 'tls12'; Invoke-WebRequest -Uri https://raw.githubusercontent.com/ansible/ansible/7963279fc2c3a8cfa6affb70307bac6fa669679c/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile C:\Windows\Temp\ConfigureRemotingForAnsible.ps1}"
powershell.exe -ExecutionPolicy Bypass -File C:\Windows\Temp\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfile -EnableCredSSP -ForceNewSSLCert -CertValidityDays 3650
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment