Account issues when using Sysprep

Page 1 of 2 12 LastLast
  1. Mystere's Avatar
    Posts : 3,223
    Windows 10 Pro
       #1

    Account issues when using Sysprep


    So I've got a set of virtual machines i'm setting up, and I want to create a "base image" I can use to clone for each one. So, I created a new VM, installed Windows 10 Pro (unactivated), downloaded the latest updates, then ran Sysprep and told it to "Generalize" and shut down. I then copied the vhdx to a safe place for cloning.

    Now, when I boot the new image, it forces me to create a new account (even though there is already an account that I created prior to generalizing). Ok, fine. I create a temp account, then promptly reboot after first login to the other account i'd setup to delete the temp account.

    Here's where it gets weird. The account is a Microsoft account, and where it used to say my name (which is associated with the account), now it only shows the email address. I can't seem to find a way to get it to re-acquire the Account information.

    Everything else I've used seems to work otherwise, but this one glitch is mildly annoying. Is there any way to skip forced account creation after generalizing? Or alternatively, delete the account automatically when shutting down after generalizing?
      My Computer

  2. Kari's Avatar
    Posts : 17,111
    Windows 10 Pro
       #2

    When sysprepping, you must tell it with a switch if next boot will be OOBE (/oobe) or Audit Mode (/audit). In your case, using /oobe switch, Windows will go through normal setup including the initial admin user creation. There's no way around it.

    A suggestion: It is not a good idea to just install Windows normally going through OOBE, creating a user account (irrelevant if local or MS) and then run sysprep on normal mode. You should rather install Windows on your technician vm but instead of going through OOBE, boot to Audit Mode from the Settings dialog after the last reboot of installation.

    To do this press CTRL + SHIFT + F3 when Settings dialog is shown:

    Account issues when using Sysprep-image.png

    Audit Mode will boot using built-in admin, no user accounts exists yet. Do your customizations, update Windows, install software, then run sysprep with /generalize and /oobe switches. Notice that if updating in Audit Mode and Windows requires a restart to apply updates, it will automatically return to Audit Mode. You can only exit to normal mode by using the /oobe switch with sysprep command.

    Now you have two choices:
    1. Create image when machine is shut down after successful sysprep, alternatively copy the VHD to safe place. When the image is then restored to new machines, or VHD used for new virtual machines, it's a fresh new install which starts from OOBE without any existing user accounts
      -- OR --
    2. Restart the technician vm and go through OOBE creating your initial user, then make an image or copy the VHD.

    See the tutorial: Windows 10 Image - Customize in Audit Mode with Sysprep - Windows 10 Forums. Just a few days ago I added a new video to show how well this works with version 1607, see this post.

    Kari
      My Computer


  3. Posts : 1,110
       #3

    When I see high-quality answers such as Kari's post, I will use a screen capture tool [if pics are embedded] to create a jpg, or, copyNpaste [if only text] into a text file -- and save such valuable advice onto my hard-drive.
      My Computer

  4. Kari's Avatar
    Posts : 17,111
    Windows 10 Pro
       #4

    Roland, you made me smile! Thanks :)
      My Computer

  5. Mystere's Avatar
    Posts : 3,223
    Windows 10 Pro
    Thread Starter
       #5

    Thanks Kari, great information. However, I don't think you have to use a switch. If you just run Sysprep, there's a drop down to select OOBE/Audit and a checkbox for Generalize, and whether to shutdown or reboot.

    The switch just avoids the GUI, AFAIK.
      My Computer

  6. Kari's Avatar
    Posts : 17,111
    Windows 10 Pro
       #6

    Of course you have to use switches, the Sysprep GUI just inserts those without you needing to type them.

    Examples.

    If these selections were chosen in Sysprep GUI...

    Account issues when using Sysprep-image.png

    ... sysprep command would be run with these three switches (highlighted):

    Account issues when using Sysprep-image.png

    If these selections were chosen in Sysprep GUI...

    Account issues when using Sysprep-image.png

    ... sysprep command would be run with this one switch (highlighted)

    Account issues when using Sysprep-image.png

    Because Shutdown is default behaviour, if no Shutdown option / switch is given as in above command example Windows will shut down when finished, next boot being to Audit Mode.

    My point is, Sysprep GUI is only a tool to set command switches and then run the command.

    In addition, using Sysprep GUI you have to name your answer file (if one is used) exactly as unattend.xml and save it to C:\Windows\System32\Sysprep folder. If it has any other name or is not saved on that specific folder, it will be ignored.

    Using command line instead the answer file can be named as you wish (with .xml extension) and saved wherever you want to, its location told with /unattend switch.

    Example sysprep command with freely named answer file:

    Account issues when using Sysprep-image.png

    Kari
      My Computer


  7. Mystere's Avatar
    Posts : 3,223
    Windows 10 Pro
    Thread Starter
       #7

    You just said the same thing I did, but yet tried to argue about it....
      My Computer

  8. Kari's Avatar
    Posts : 17,111
    Windows 10 Pro
       #8

    Don't want to start an argument but this is what you said:

    Mystere said:
    However, I don't think you have to use a switch.
    That statement is absolutely completely not true and invalid. Sysprep command needs switches, minimum requirement being the startup option switch either /oobe or /audit.

    You have a funny way to take it when you are corrected. I repeat: your statement about Sysprep not needing switches is BS not true. To sysprep you need to use at least one switch, it's irrelevant if you enter required switch(es) using GUI or command line.

    Kari
      My Computer

  9. Mystere's Avatar
    Posts : 3,223
    Windows 10 Pro
    Thread Starter
       #9

    You are impossible to deal with.

    Saying "you must use the switch" means you must specify the switch on the command line. You do NOT need to specify the switch on the command line is my only point. Running it without switches lets you choose the options from the GUI without command line switches. Why is that so hard to understand?
      My Computer

  10. Kari's Avatar
    Posts : 17,111
    Windows 10 Pro
       #10

    I must apologize, my previous post in this thread came out too strong, too aggressive. I have no excuse for that, and although not wanting to delete or edit the post in question I feel I have to say I am sorry for my behaviour.

    I hope a short explanation is allowed.

    I am a fanatic Sysprep fan. I totally love what it offers, what kind of magic I can do with it. I wrote my first Sysprep related tutorial back on our sister site the Seven Forums almost seven years ago, have been really concentrated in trying to get normal average users to find Sysprep and its possibilities.

    A difficult person as I am, with even more difficult personality, I take all misconceptions or wrong interpretations of a topic this close to my heart as a personal insult. Of course I know it's wrong, but knowing it is wrong does not change how I react due faults in my personality: too impulsive, too fast, too aggressive.

    The above explanation is in no way meant to be taken as "I had right to post what I did". It is simply a short explanation why I reacted so strong. I am sorry and my apology is sincere.

    A very sincere

    Kari
      My Computer


 
Page 1 of 2 12 LastLast

Related Threads
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 10:59.
Find Us




Windows 10 Forums