Generate a new SID on Windows Server 2008 and Windows 7

With the NewSID tool no longer supported by Microsoft for more recent versions of Windows, you may find yourself in a situation where you need to generate a new SID on a Windows Server 2008 or Windows 7 computer, and wonder which tool you need to use. I myself have run across an issue in the past in our development environment where duplicate SIDs caused a problem. Care needs to be taken when cloning Windows virtual machines, particularly if they will later be used as domain controllers.

In order to avoid any issues like this, the new preferred method to set a new SID on a Windows machine is to use Sysprep. Before running Sysprep, you may wish to verify the current SID on the sytem that you wish to modify. This can easily be done by running the psgetsid utility, which is part of the excellent Pstools developed by Mark Russinovich. The output of the psgetsid command can be seen below, showing the current machine SID:

Output of psgetsid before running Sysprep on Windows Server 2008 R2

 Next you can sysprep by running the following command:

C:\Windows\System32\Sysprep\sysprep.exe

Running Sysprep
 
On the Sysprep, screen make sure that you tick the ‘Generalize’ tick box as shown below:
 

Choose settings for the System Preparation Tool

 The Sysprep process will take a few minutes to run, and will automatically reboot the system if you chose to do so. On reboot, the following screen will be displayed. Click ‘Next’ to continue:

 

Click next to continue the Sysprep process

 After the sysprep process is complete, you can run psgetsid again to verify that a new SID has been generated for this computer:

Output of psgetsid after running Sysprep on Windows Server 2008 R2

 

 
 
 
Advertisements

10 Responses to Generate a new SID on Windows Server 2008 and Windows 7

  1. Pingback: Смена SID идентификатора через sysprep « HidX *nix Log – It Republic

  2. Pingback: The Ji Village News » Setting up Windows development environment with VirtualBox

  3. toffitomek says:

    please remember there is limited number of times you can run sysprep (I think three) – hope you don’t find the hard way (e.g. at the end of making this ‘perfect image’ 😉

  4. Vivek Kumar says:

    Thanks for the Post. It saved my day :).

    Vivek

  5. Francesco says:

    Does sysprep change the sid after you run it or it will generate one on reboot?

  6. DosTrenzas says:

    It’s very important to check the “Generalize” option. Without the “Generalize” option, “SID” is unchanged. Here is a lab that explains:

    http://www.sysadmit.com/2014/11/windows-sysprep-sid.html

  7. mohan says:

    Thank you friend..it worked for me…great work… appreciate for sharing this post

  8. Jason says:

    I have a machine that I need to change the SID due to a third party software that is recognizing two machines as the same. If I run sysprep on an established machine…is that going to break the installed software?

  9. Bill Cosner says:

    It should be pointed out that sysprep puts the machine back into plug-and-play driver mode, so any drivers that were installed prior to sysprep need to be re-executed. Very irritating.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: