Created
December 14, 2017 19:20
-
-
Save alexcheng1982/e9251763a1d4e4ab48197d7b5e2391a4 to your computer and use it in GitHub Desktop.
User data to configure WinRM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<powershell> | |
$admin = [adsi]("WinNT://./administrator, user") | |
$admin.PSBase.Invoke("SetPassword", "{{ win_initial_password }}") | |
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