Hello @Fisher, Ethan ,
Thanks for reaching out to Microsoft Q&A Platform.
I would recommend 2 things from that document:
1) The powershell code where it tries to create the VM, those commands are running as "JOB" in the back ground - so it will take time for the VMs to be created. Sometimes if the VM creation fails you won't be able to track the failures as the JOB is running in the back end.
Recommendation is:-
From the code of VM creation in For Loop section , remove the last part -AsJob , so that you can see the progress of VMs creation on the screen before you go-ahead and install IIS
for ($i=1; $i -le 3; $i++)
{
New-AzVm -ResourceGroupName "myResourceGroupLoadBalancer"
-Name "myVM$i" -Location "East US"
-VirtualNetworkName "myVnet" -SubnetName "mySubnet"
-SecurityGroupName "myNetworkSecurityGroup" -OpenPorts 80
-AvailabilitySetName "myAvailabilitySet" -Credential $cred
}
Second Recommendation:
Try to copy all those commands in a Powershell script and execute that particular script instead of individual commands. Again remove that -AsJob paramater in the For Loop as a part of VM creation.
Let us know if that helps !
Regards,
Shiva.