diff --git a/Terraform/main.tf b/Terraform/main.tf index 7be7005..734f680 100644 --- a/Terraform/main.tf +++ b/Terraform/main.tf @@ -205,7 +205,11 @@ resource "aws_instance" "dc" { instance_type = "t2.medium" provisioner "remote-exec" { - inline = ["choco install -force -y winpcap"] + inline = [ + "choco install -force -y winpcap", + "powershell -c \"$ifindex = get-netipinterface | where-object InterfaceAlias -eq 'Ethernet' | where-object AddressFamily -eq 2 | select-object -ExpandProperty ifIndex; set-dnsclientserveraddress -InterfaceIndex $ifindex\"", + "ipconfig /all" + ] connection { type = "winrm"