Skip to content

Instantly share code, notes, and snippets.

@GoodMirek
Last active August 3, 2017 18:20
Show Gist options
  • Save GoodMirek/a8988a9a7f456262cf81f5e1aaaab363 to your computer and use it in GitHub Desktop.
Save GoodMirek/a8988a9a7f456262cf81f5e1aaaab363 to your computer and use it in GitHub Desktop.
AWS EC2 Windows instance userdata for automated installation of Datadog agent
<powershell>
# Comment: EC2config service executes user data upon boot, if configured to do so.
# EC2config log is available at: C:\Program Files\Amazon\Ec2ConfigService\Logs\Ec2ConfigLog.txt
mkdir "c:\datadog\download"
Set-Location "c:\datadog\download"
Read-S3Object -BucketName ddagent-windows-stable -Key ddagent-cli.msi -File c:\datadog\download\ddagent-cli.msi
& msiexec --% /qn /i c:\datadog\download\ddagent-cli.msi APIKEY="abcdefghijklmnopqrstuvwxyz123456" TAGS="environment:production"
</powershell>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment