I am beginner to this PowerShell script. Please help me with this as I got stuck here. I'm using this user data given below in ec2 window instance launch config So, how can we proceed here can we get the same way as we are getting in code deployment agent for both php and apache latest version. I am not aware of the PowerShell script for invoking apache and php version.
UserData: !Base64 'Fn::Join': - |+
- - <powershell>
- Install-WindowsFeature -name Web-Server -IncludeManagementTools
- Install-WindowsFeature Web-Asp-Net45
- Add-WindowsFeature Web-Http-Redirect
- Add-WindowsFeature Web-Windows-Auth
- Import-Module AWSPowerShell
- New-Item -Path "c:\codedeploy" -ItemType "directory" -Force
- Invoke-WebRequest -URI https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/codedeploy-agent.msi -OutFile c:\codedeploy\codedeploy-agent.msi
- c:\codedeploy\codedeploy-agent.msi /quiet /l c:\codedeploy\host-agent-install-log.txt
- New-Item -Path "c:\" -Name "Apache24" -Type "directory"
- </powershell>