Jim Rigsbee
2020-02-13 1e2288d704cc7b308efca749072d6f9df86fa986
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
UserData:
      "Fn::Base64":
        "Fn::Join":
          - ""
          - - "<powershell>\n"
            - "Get-ScheduledTask *ngen* | Disable-ScheduledTask\n"
            - "reg add 'HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsUpdate\\Auto Update' /v AUOptions /t REG_DWORD /d 1 /f\n"
            - "net stop wuauserv\n"
            - "net start wuauserv\n"
            - "Set-MpPreference -DisableRealtimeMonitoring $true\n"
            - "$admin = [adsi]('WinNT://./administrator, user')\n"
            - "$admin.PSBase.Invoke('SetPassword', '{{windows_password}}')\n"
            - "Invoke-WebRequest -Uri https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile C:\\ConfigureRemotingForAnsible.ps1\n"
            - "C:\\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert -EnableCredSSP -GlobalHttpFirewallAccess\n"
            - "</powershell>"