Created
May 27, 2018 22:58
-
-
Save srkiNZ84/f835c0038e055af61af0bcede6044b01 to your computer and use it in GitHub Desktop.
Simple PowerShell script to install IIS and the AWS CodeDeploy agent on a Windows EC2 instance
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> | |
Start-Transcript; | |
# Install IIS | |
Import-Module ServerManager; | |
Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName 'IIS-WebServerRole', 'IIS-WebServer', 'IIS-ManagementConsole'; | |
# Install CodeDeploy Agent | |
Import-Module AWSPowerShell; | |
New-Item -Path "C:\Temp" -ItemType "directory" -Force; | |
Read-S3Object -BucketName aws-codedeploy-us-east-1 -Key latest/codedeploy-agent.msi -File c:\temp\codedeploy-agent.msi; | |
c:\temp\codedeploy-agent.msi /quiet /l c:\temp\host-agent-install-log.txt; | |
</powershell> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment