In AWS, I need to automate AWS windows server 2019 installation using Terraform Script.
Inside that AWS windows server, I need to Enable IIS10 and install ASP .NET 4.6.2.
I need to add user data(using PowerShell script) to Enable IIS10 and install ASP .NET 4.6.2.
I have used below userdata in terraform script to Enable IIS10 and install ASP .NET 4.6.2.
# Bootstrapping PowerShell Script
data "template_file" "windows-userdata" {
template = <<EOF
<powershell>
# Install IIS
Install-WindowsFeature -name Web-Server -IncludeManagementTools;
# Install DotNet 4.6
Install-WindowsFeature .NET-Framework-46-Features;
# Restart machine
shutdown -r -t 10;
</powershell>
EOF
}
Everything is working fine but I am unable to install .Net4.6.2. It is installing .Net4.8.
Can anyone please tell me, Is there any way to install ASP .Net4.6.2 using userdata(PowerShell script)?
I need to install ASP .Net4.6.2 version.