Last active
August 3, 2017 18:20
-
-
Save GoodMirek/a8988a9a7f456262cf81f5e1aaaab363 to your computer and use it in GitHub Desktop.
AWS EC2 Windows instance userdata for automated installation of Datadog agent
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> | |
# 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