skip to Main Content
  1. I have created a VM of Windows Server 2022 Datacenter Azure Edition x64 bit in Central US.
  2. I have installed the IIS Web Server while provisioning the VM itself by selecting the custom script extension at Advanced Menu:

enter image description here

  1. I have selected the PowerShell script stored in the Storage account container.
import-module servermanager
add-windowsfeature web-server -includeallsubfeature
add-windowsfeature Web-Asp-Net45
add-windowsfeature NET-Framework-Features

enter image description here

  1. Enabled the Ports Http (80), Https (443), and RDP (3389).
    There is no proxy.

  2. When I Open the RDP Client:

enter image description here

In other 2 VMs created in Same VNet and of Same OS Same IIS Web server PS Script installed using Custom script extension while provisioning the VMs, able to get the Windows GUI through RDP:

enter image description here

Note:

  1. I have also done the same process in 3 VMs created in the Same Virtual Network, with the Same Custom Script Extension selected that installs IIS Web Server but only one of them is not working in the RDP Client (VM GUI Desktop is not showing other than SConfig command prompt).

  2. Deleted all the 3 VMs and created again to check if any fault of mine while creating the VMs but same result.

  3. In the VM Index Menu > Run Command > I have run the command Set-SConfig -AutoLaunch $False. Still, same Command prompt occurring instead of Windows Desktop GUI.

In Short:

  1. Windows 2022 Data center Azure Edition
  2. All 3 VMs in same virtual network
  3. All 3 VMs in same availability set
  4. All VM’s are installed with IIS Web Server while provisioning using Custom Script Extension in the Advanced Menu of VM Creation. (That Script details given above).
  5. Location (optional) – Central US
  6. Enabled the Ports 80, 443 and 3389 while creating the VMs.
  7. Subscription – Free Trail

2

Answers


  1. I tried to reproduce the issue but didn’t happen, it worked successfully with the following steps as you have given in the question:

    1. 3 Windows VM’s of Windows Server 2022 Datacenter Azure Edition in the Same VNet, Availability Set with Custom Script Extension which installs the IIS Web server while provisioning the VMs.
    2. Opened the ports 80, 443 and 3389 in NSG.

    enter image description here

    enter image description here

    enter image description here

    1. For all the VMs, all the Custom Script Extensions provisioning succeeded which installed IIS Web Server in the VMs:

    enter image description here

    enter image description here

    enter image description here

    I have tested all the VMs using RDP Client as you can see below:

    VM1:

    enter image description here

    VM2:

    enter image description here

    VM3:

    enter image description here

    I found a similar question opened in the MS Q&A Forum of Azure VMs where the User Imran has provided the answer i.e., to delete the SConfig File using the registry editor.

    I Know that you cannot use the Run Dialog box to open the registry editor for doing the above solution using GUI. You can also do that using Command prompt, sample steps given in this article of Windows Central and MS Doc on SConfig related to using the Windows 2022 Datacenter OS in Azure VMs.

    Login or Signup to reply.
  2. For the future, when Sconfig comes up:
    15. Exit to terminal
    Set-Sconfig -AutoLaunch $false

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search