Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Ansible Provision Windows in AWS with Stock AMIs (Part 1)
ansible win -i hosts -m win_ping
aws-win-host ansible_ssh_host=(your aws host public IP here)
[win]
aws-win-host
[win:vars]
ansible_connection=winrm
ansible_ssh_port=5986
ansible_ssh_user=Administrator
ansible_ssh_pass=myTempPassword123!
<powershell>
$admin = [adsi]("WinNT://./administrator, user")
$admin.PSBase.Invoke("SetPassword", "myTempPassword123!")
Invoke-Expression ((New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'))
</powershell>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment