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.
241 questions
0 comments No comments
{count} votes

7 answers

Sort by: Newest
  1. Stefan Falk 166 Reputation points
    2022-01-19T15:45:28.877+00:00

    Hello everybody,

    Waltont-9882's posting reminded me to post.

    a) We did not use LAPS there.

    b) The problem got solved once we did not have special characters such as ` and = and ? and ß (a German national character) and " in the local administrator password.

    Hope this helps you, too.

    Best Regards,
    Stefan


  2. Stefan Falk 266 Reputation points
    2020-12-22T12:01:50.723+00:00

    Hello everybody,

    we used the very same script for another customer using VMware and could deploy Windows Server 2019 terminal servers from a template VM with no problem at all. I still have no clue what's going wrong with that one customer where it does not work any more. The next step should be to try to attach the vmdk to another VM to get to the sysprep log files. I'll return here when I have results.

    Best Regards,
    Stefan


  3. 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


  4. 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

  5. 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