Forum Discussion

ChielD1975's avatar
ChielD1975
Copper Contributor
Nov 06, 2022

Custom image

Hello,

 

I've created a Windows 11 image with several applications installed on it. Sysprepped the VM, created a image defination, image gallery etc. When I add a new session host based on this image, it creates a VM, it's added to the hostpool, but I'm unable to logon.

 

The strange thing is, that this VM should be part of AzureAD and needs to be managed with Intune. Unfortunately nothing appears in the Intune portal. Could someone please advise me how to troubleshoot this issue?

 

Best regards,

Michiel

4 Replies

  • BrandNewindiaN's avatar
    BrandNewindiaN
    Copper Contributor

    Hi Michiel,

    I need help and seems I am in the same situation now. I am trying to create golden image for AVD hostpool. But VMs are not enrolling with intune.

    1. created azure VM
    2. Software preparation 
    3. disabling bit locker (sysprep recommended)
    4. running sysprep
    5. VM capture, saving image & Vm delete.

    VMs created with this image, joined with entra ID. I am able to login but HOSTPOOL VMs are not enrolled in intune..

    I am I missing any GPO or Regedit related to intune auto enrolment before sysprep. 
    do we need to install any extension, addons or any tools before sysprep,

     

    Thank you 

    VC

  • ChielD1975's avatar
    ChielD1975
    Copper Contributor
    I've found the issue!

    The Golden Image was AzureAD joined before sysprepping it. Did a couple of retries to leave AzureAD, but nothing helped. I've created a new Golden Image, without any domain connection, installed the software on it, ran an optimalization script, sysprepped the VM and now it works as expected!

    Again thanks for the reply Johan!
  • Hi,
    A couple of questions:
    - Did you assign the Virtual Machine user logon role?
    - with Azure AD did you select the box for Intune Enrollment?
    - Do you have the Azure AD extension on your session host? Is it in Azure AD?
    • ChielD1975's avatar
      ChielD1975
      Copper Contributor

      Johan_Vanneuville 

       

      Thanks for the quick reply!

       

      - VM user logon role is assigned to a AAD group

      - Intune enrolment is selected

      - Azure AD extension is installed and enabled

      - VM is not visible in AzureAD

       

      When I RDP with a local admin in the VM and ran dsregcmd /status it's showing an error regarding the Machine Key.

       

      Best regards,

      Chiel

Resources