Sysprep of a Windows Server 2019 leads to a machine where we cannot logon

Stefan Falk 266 Reputation points
2020-10-08T15:17:56.87+00:00

Hello everybody,

we routinely deployed Windows Server 2016 terminal servers by cloning and sysprepping them from a template (using a PowerShell script). The very same with Windows Server 2019 fails, and even if we manually just clone the template VM, start it (disconnected from the network), sysprep it (OOBE, generalize, reboot), the following symptoms occur:

1) Sysprep takes 15 - 20 minutes (compared to, say, 5 minutes normally)

2) Sysprep does not ask for a new local Administrator password.

3) The machine boots, but we cannot log on a s a local Administrator. This is regardless of whether we

  • clone and sysprep manually,
  • include a C:\Windows\Setup\Scripts\SetupComplete.cmd with "net user administrator /active:yes" in the template (see https://kb.vmware.com/s/article/2034622), or
  • use our PowerShell script which normally injects a fixed Administrator password via the sysprep answer file.

Has something changed in sysprep's behaviour between Windows Server 2016 and 2019?

Best Regards,
Stefan Falk

Windows Server Setup
Windows Server Setup
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
240 questions
0 comments No comments
{count} votes

7 answers

Sort by: Most helpful
  1. Stefan Falk 266 Reputation points
    2020-10-10T17:52:53.027+00:00

    Hello PieseFordro,

    Thank you. Yes, that is exactly what we do normally. We have sysprepped many servers at many customer's sites both manually and automatically. The point is really simple here:

    1) A freshly installed machine.
    2) Sysprep it with no customization file at all.
    3) The result is a machine on which you cannot logon using the local Administratory account.

    And we wonder what could be wrong, as there should hardly be an opportunity to make a mistake here.

    Best Regards,
    Stefan

    1 person found this answer helpful.
    0 comments No comments

  2. Teemo Tang 11,331 Reputation points
    2020-10-09T07:02:09.37+00:00

    Hello Stefan,

    Please understand that VMware is not Microsoft product, if you want to use vmware to deploy Windows Server 2016 terminal servers, you’d better ask for help from vmware support.
    Go back to sysprep, manually sysprep server 2019 has nothing different with server 2016, normal processes are:

    1. Installing Windows Server 2019 onto a new server
    2. Configuring customizations and updates onto your new server
    3. Running Sysprep to prepare and shut down your master server
    4. Creating your master image of the drive
    5. Building new servers using copies of the master image
      Or use unattended file
    6. Create unattendfile with Windows System Image Manager.
    7. Copy your unattendedfile.xml file to the \system32\sysprep folder
    8. Run CMD as Administrator
    9. sysprep.exe /generalize /oobe /unattended:yourunattendedfile.xml
      Next, you could Add a Custom Script to Windows Setup
      https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/add-a-custom-script-to-windows-setup

    -------------------------------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Stefan Falk 266 Reputation points
    2020-10-10T13:52:18.723+00:00

    Hello TeemoTang,

    Thanks for your input.

    As to avoid the VMware provisioning or our PowerShell provisioning script, we tried to just make a copy of the VM and sysprep it totally manually. To I think we have no cause to assume the problem is related to VMware. We are, of course, aware, that Microsoft could not support a VMware case.

    The question remains: What could be wrong with the Windows Server 2019 machine that would cause sysprep to somehow result in an unknown local Administrator password or a disabled local Administrator account?

    Best Regards,
    Stefan

    0 comments No comments

  4. Piese Auto Ford 1 Reputation point
    2020-10-10T16:16:42.157+00:00

    These steps are best
    1.Installing Windows Server 2019 onto a new server
    2.Configuring customizations and updates onto your new server
    3.Running Sysprep to prepare and shut down your master server
    4.Creating your master image of the drive
    5.Building new servers using copies of the master image
    Or use unattended file
    1.Create unattendfile with Windows System Image Manager.
    2.Copy your unattendedfile.xml file to the \system32\sysprep folder
    3.Run CMD as Administrator
    4.sysprep.exe /generalize /oobe /unattended:yourunattendedfile.xml
    Next, you could Add a Custom Script to Windows Setup

    0 comments No comments

  5. Stefan Falk 266 Reputation points
    2020-10-19T08:25:58.473+00:00

    Hello PieseFordro,

    If it cannot be answered why the machine is left unusable by sysprep, is there a way to get to the sysprep log? I guess we could only attach the virtual disk to another, running machine and look there, right?

    Best Regards,
    Stefan