Upgrading Windows Server 2008 R2 without media


Windows Server 2008 R2 introduces a new command-line utility, DISM, the Deployment Image Servicing and Management tool.    One of DISM’s many useful features is the ability to use its edition-servicing commands to upgrade an R2 installation without requiring install media.  This is functionally equivalent to Windows Anytime Upgrade in a Windows 7 client install, and can be performed on both an online or offline image, and on both full Server and Server Core installations.

 

Upgrades using the edition servicing method are quick, and don’t require a full reinstall of the operating system.  Deployed roles and features, and other characteristics (machine name, user and admin accounts, etc) are persisted forward.     Because the target editions are staged within the image, only the updates necessary to move from edition to the next are applied.

 

The upgrade options are limited to edition families, and are irreversible – you can’t downgrade once you’ve gone up an edition.  Additionally, you can’t move from full Server to Server Core (or vice versa).

 

The supported upgrade paths are:

 

·         Windows Server 2008 R2 Standard -> Windows Server 2008 R2 Enterprise -> Windows Server 2008 R2 Datacenter

·         Windows Server 2008 R2 Standard Server Core -> Windows Server 2008 R2 Enterprise Server Core -> Windows Server 2008 R2 Datacenter Server Core

·         Windows Server 2008 R2 Foundation -> Windows Server 2008 R2 Standard

 

The tool essential for this process, DISM.exe, is included in every installation of Windows Server 2008 R2, and the general usage for online and offline use is documented on TechNet here:  http://technet.microsoft.com/en-us/library/dd744380(WS.10).aspx

 

One scenario that we sometimes use internally is the online upgrading of Hyper-V hosts.  If you decide that you want to move from Enterprise’s 4 VM limit to Datacenter’s support for an unlimited number of VMs, you can migrate the VMs to another host, upgrade the old host in less than thirty minutes, and then immediately migrate the VMs back once the process is complete.  There’s no need to take the whole server offline or rebuild from scratch.

 

The syntax for DISM is fairly straightforward.  From an elevated command prompt, you can query for the current edition, for possible target editions, and initiate the upgrade.  To upgrade, you need to provide a valid 25-character product key for the edition to which you’re upgrading.

 

To determine the installed edition, run:

 

DISM /online /Get-CurrentEdition

 

To check the possible target editions, run:

 

DISM /online /Get-TargetEditions

 

Finally, to initiate an upgrade, run:

 

DISM /online /Set-Edition:<edition ID> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

 

So, for example, to upgrade to Windows Server 2008 R2 Datacenter from a downlevel edition, you would run:

 

DISM /online /Set-Edition:ServerDatacenter /productkey:ABCDE-ABCDE-ABCDE-ABCDE-ABCDE

 

After running the /Set-Edition command, DISM will prepare the operating system for the edition servicing operation, then reboot twice while it applies the changes to the operating system.  After the final reboot, you’ll be running the new edition!  

 

UPDATE: One important note, as I’m reminded by Xaegr in the comments, is that the server can’t be a DC at the time of upgrade.  If you demote a DC using dcpromo, you can upgrade, then re-promote it (you may need to migrate FSMO roles, etc, in order to succesfully demote.)

 

Definitely let me know if you have questions about particular details – we’re excited that this functionality is now available.

 

thanks,

Brendan


Comments (55)

  1. Anonymous says:

    Hi Xaegr,

    Unfortunately, I forgot to post one important caveat to the process – the machine can’t be a DC.  

    If you demote it first, the upgrade should succeed.  Once it finishes, you can promote the machine again.

    I’ll edit the original post to add that information, but definitely let me know if that succeeds?  Sorry for the inconvenience.

    Brendan

  2. Anonymous says:

    Hi Brendan,

    I have a Win2K8R2 Enterprise OEM system that I would like to in-place upgrde to Win2K8R2 Datacenter Edition using a VLK. Is this possible? Would I need to use slmgr.vbs to change the installed product key from OEM to VLK, first, and then use DISM to upgrade from Enterprise VLK to Datacenter Edition VLK?

    Cheers,

    David.

  3. Anonymous says:

    My server shows below error
    C:Usersadministrator>DISM /online /Set-Edition:ServerEnterprise /ProductKey:489
    J6-VHDMP-X63PK-3K798-CPX3Y

    Deployment Image Servicing and Management tool
    Version: 6.1.7600.16385

    Image Version: 6.1.7600.16385

    Error: 50

    Setting an Edition is not supported with online images.

    The DISM log file can be found at C:WindowsLogsDISMdism.log.

    But my server not a DC, only file server role installed.
    Any suggestion?

  4. Anonymous says:

    Can you determine if the server is a retail or volume license?  If so, can you change it as well?

  5. Anonymous says:

    Hi!

    Can you upgrade a Hyper-V Server 2008R2 to a "normal" Windows Server Standard Core Server ?

    Thank you

    Christian

  6. Anonymous says:

    Hello Brendan! I finally got the opportunity to test this great feature, but it isnt working for some reason.

    I have Windows Server 2008 R2 Standart x64, Full installation, RTM. There are domain controller, certificate authority, and hyper-v roles (I know, this isnt recommended, but this is my home lab) and some other minor roles. Here is output from DCIM (running with elevated privilegies):

    PS D:> dism /online /get-currentedition

    Deployment Image Servicing and Management tool

    Version: 6.1.7600.16385

    Image Version: 6.1.7600.16385

    Current edition is:

    Current Edition : ServerStandard

    The operation completed successfully.

    PS D:> dism /online /get-targeteditions

    Deployment Image Servicing and Management tool

    Version: 6.1.7600.16385

    Image Version: 6.1.7600.16385

    Editions that can be upgraded to:

    Target Edition : ServerDataCenter

    Target Edition : ServerEnterprise

    The operation completed successfully.

    Looks fine, but when I try to actually upgrade (using the real key of course) I got error:

    PS D:> dism /online /Set-Edition:ServerEnterprise /ProductKey:12345-12345-12345-12345-12345

    Deployment Image Servicing and Management tool

    Version: 6.1.7600.16385

    Image Version: 6.1.7600.16385

    Error: 50

    Setting an Edition is not supported with online images.

    The DISM log file can be found at C:WindowsLogsDISMdism.log

    I also tried DataCenter with no luck. Here is lines from log that looks related to problem:

    2009-11-20 19:18:13, Info                  DISM   DISM Provider Store: PID=2960 Getting Provider Edition Manager – CDISMProviderStore::GetProvider

    2009-11-20 19:18:13, Info                  DISM   DISM Provider Store: PID=2960 Provider has previously been initialized.  Returning the existing instance. – CDISMProviderStore::Internal_GetProvider

    2009-11-20 19:18:13, Info                  DISM   DISM Transmog Provider: PID=2960 Current image session is [ONLINE] – CTransmogManager::GetMode

    2009-11-20 19:18:13, Info                  DISM   DISM Transmog Provider: PID=2960 Current image session is [ONLINE] – CTransmogManager::GetMode

    2009-11-20 19:18:13, Info                  DISM   DISM Transmog Provider: PID=2960 GetProductType: ProductType = [LanmanNT] – CTransmogManager::GetProductType

    2009-11-20 19:18:13, Error                 DISM   DISM Transmog Provider: PID=2960 Setting an Edition is not supported online. – CTransmogManager::ExecuteCmdLine

    2009-11-20 19:18:13, Error                 DISM   DISM Transmog Provider: PID=2960 [Upgrading system]: Setting an Edition is not supported with online images.

    If you drop me a message to xaegr ат yandex dоt ru i can send you a full log file or other additional information.

    Thanks.

  7. Anonymous says:

    Hi everyone,

    MAK keys map to multiple editions, so the underlying infrastructure doesn't accept them.  If you use the generic KMS client key, as Matthew suggests, that will allow you to proceed with the upgrade, and then you can either replace the key with a valid MAK post-upgrade or just use the KMS client key to activate against your internal KMS server.

    The full list of KMS client keys can be found here on technet:  technet.microsoft.com/…/ff793406.aspx

    It's important to note that you need to use a KMS client key, rather than a KMS host key.  The latter is what's used to configure and activate the KMS (and is specific to that one KMS install), while the former is generic to every client of a KMS.

    thanks,

    Brendan

  8. Anonymous says:

    Hi Luke,

    The easiest way to determine what channel (Retail, OEM, or one of the Volume License options) you’re currently using is to run, from an elevated command prompt, the "slmgr.vbs" script that’s embedded in the product.

    "slmgr.vbs /dlv" will give you the detailed license view, and in the description section, you’ll see what channel you’ve got deployed.  slmgr.vbs works remotely as well, so you can point it at any server that you have admin credentials for.

    If you want to swap a product key, you can use slmgr.vbs to handle that as well:  the /upk switch uninstalls a key, while /ipk installs one.

    Let me know if you have any trouble?

    Brendan

  9. Anonymous says:

    No, unfortunately – Hyper-V Server is a separate product line, so doesn’t fit into the edition families I listed above.  Sorry!

    Brendan

  10. Anonymous says:

    Can this feature be run on a 2008 R2 Standard machine that already has SP1 installed?  I'm wanting to move it to Enterprise.

  11. Martins says:

    Doesn't work for me. I have tried 20 plus supposedly valid keys from our VLK site for W2K8 R2 STD/ENT to try and upgrade a R2 Std server to Ent. I tried all my MAK and KMS keys. I ran the .vbs script which told me I had a KMS install. Do I now have to ring MS Customer Support?

  12. Matt says:

    MartinS, i had the same issue, but i was able to get by it by using the Generic 2008R2 keys for KMS Enterprise

  13. Andy says:

    Hi Matt.

    What do you meen by generic key?

    Is it the product ID (numbers generated after KMS activation)?

    I tried to use these from my Standard 2008R2 activation when trying to upgrade from DISM, but no luck.

    I do not have any W2KR2 Enterprise as of now, this is the first.

  14. The generic KMS client key for Windows 2008 R2 Enterprise is  489J6-VHDMP-X63PK-3K798-CPX3Y

    If you do the upgrade with that key, it will work. Just google KMS Client Keys and follow the bouncing ball.

  15. Andrey says:

    Hi Brendan,

    Good staff. Very helpful.

    The machine can't be a DC. What can you say about Exchange 2010 SP1 on Windows 2008 R2 Standard that need to be upgraded to Enterprise?

    Thanks

  16. TodK says:

    I followed these instructions and am now unable to install Server 2008 R2 SP1!  I've posted to the TN forums.. happened on multiple VM's

    social.technet.microsoft.com/…/e5ab00b9-9efe-44e1-bb66-5492028d5967

  17. Andrey says:

    Hi TodK,

    (check this update
    support.microsoft.com/…/976902
    )

    Today I tested the upgrade server edition from the standard to the Enterprise on the physical server IBM 3550.

    Since the beginning has been installed server 2008 R2 standard without any updates, then installed Exchange 2010 SP1. After that I made the check for updates and got 67 updates, but among them the first service pack was not in the list! Installing all 67
    updates is successful, then reboot, then another check for updates and here he was the first service pack.

    Without installing the service pack I run:

    DISM /online /Set-Edition:ServerEnterprise /ProductKey:489J6-VHDMP-X63PK-3K798-CPX3Y

    Reboot.

    Check version, all at first glance good. I got Enterprise edition.

    Now run the install service pack …. Reboot, one more … everything goes according to plan …

    And here he is the moment of truth, when you log on watch box – service pack was successfully installed. Check the verson: 2008 R2 Enterprise SP1.

    Some remarks on the upgrade:

    1. I used the KMS client key.
    technet.microsoft.com/…/ff793421.aspx

    2. tested only a single physical server.

    3. I want to draw attention to the following update:
    support.microsoft.com/…/976902

    4. Exchange working properly after all the above done.

    5. All updates from Windows Updates

    6. About DISM
    technet.microsoft.com/…/dd744380(WS.10).aspx

    This is was test enviroment, 2 weeks later i want to do this on production server (have 32gb ram useble of 64 installed)

  18. Milton Lopez says:

    We have two Dell R710 servers running Windows Server 2008 R2 SP1 Standard Edition. Each server runs several Hyper-V VMs, some running Windows Server 2003 R2 SP1 and some Windows Server 2008 R2 SP1. Can we safely upgrade the host systems to Datacenter using this procedure after shutting down all the VMs but without removing them? Exporting and removing the VMs would take too much time and disk space and would make this impossible for us.

    Thanks in advance.

  19. John B says:

    I have a Windows Server 2008 R2 (Standard Edition).  I've issued the command with the generic license key to move the server to enterprise edition:

    dism /online /set-edition:ServerEnterprise /set-productkey:{generic key}.  

    What I get is the Error 50 – the product key is not supported with online images.

    I'm wanting to upgrade my inplace, and apply my enterprise licenses keys after the fact.  

    Any ideas?

  20. t_d says:

    Hey John,

    I suppose it's the same issue which has been mentioned above, your Server cannot be a DC during the upgrade. You have to demote the DC first.

    t_d

  21. Andre Ranieri says:

    We have a Windows 2008 R2 Standard Edition VM running SQL 2008 R2 in production which we need to upgrade to Enterprise Edition because we're pushing against the 4 VCPU limit.   Our virtual environment is Citrix XenCenter 5.6 FR 1.   This VM is not a domain controller.     Are there any landmines I should be aware of, or can we be fairly confident that this will work for us?

    Thanks,

    Andre

  22. Daniel Raymond says:

    This migration killed our two dedicated servers (Dell PowerEdge R410). We migrated from Standard to Enterprise since we had 48 GB of memory on these machine. Standard Edition only supports 32GB.

    Remote Desktop Connection started to not working. Then network problems on the GB Network, then IIS problems, etc. We now have to reformat these two servers, and be sure we will install Enterprise Edition directly.

    Daniel

  23. TM says:

    Does this procedure work on Windows 2008 systems as well?

  24. rahul says:

    @TM: This feature came with 2008 R2/ Windows 7, so it wont work with 2008 🙁

  25. Wayne Whittle says:

    We recently installed Exchange 2010 + SP1 onto Windows Server 2008 R2 Standard (64-bit) but in order to create and use the DAG feature of Exchange 2010 we need it to be running on Windows Server 2008 R2 Enterprise (64-bit) . It is not a DC – rather it is dedicated to Exchange 2010. Is it ok to go ahead and use DISM to upgrade the O/S without any repercussions on my Exchange 2010 setup ?

  26. mike says:

    I saw this post too late and performed the upgrade using the DVD media.  Do they both essentially do the same thing, or is using the media to perform the "upgrade" a total overkill for 2008 R2?  Seems like upgrading with the media would simply launch the DISM utility?

  27. Magnus Bjork says:

    Event if it might work to use DISM to upgrade a server from stf to ent with Exchange on it's not supported so I would never do that in a production scenario!

    From technet.microsoft.com/…/bb691354.aspx :

    If you're installing the Mailbox server role and you intend the server to be a member of a database availability group (DAG), you must be running the Enterprise Edition of Windows Server 2008 or Windows Server 2008 R2. The Standard Edition doesn't support the features needed for DAGs. You can't upgrade Windows when Exchange is installed on the server.

  28. Chris Howell says:

    We upgraded a Windows Server 2008 R2 Standard running Active Directory Certificate Services (AD CS) to Enterprise successfully, however, the AD CS Roles had to be completely reinstalled.  We chose to use existing Key and Certificates, but since we did not take a backup of AD CS, the Issuance History was gone.  We upgraded to the next two servers (also Running AD CS) but took backups first and restored after the AD CS Role was re-instated.  Worked perfectly…It may affect other existing AD Roles so review those prior to upgrade.  Clearly the AD DS was called out above.

    For sure, take backups of the AD CS Prior for a flawless restore of the AD CS database.

  29. Aaron Bolthouse says:

    I am attempting an upgrade of Windows Server 2008 R2 Standard to Datacenter to shore up licensing. I attempted the commands to complete the update using the KMS client key as we use KMS. The machine is a VM in vSphere 4.1 Update 2. It appears to be stuck in a reboot loop trying to configure Windows. Any suggestions on how to handle this issue? It has rebooted over 15 times now…

  30. Todd Jones says:

    And how about when the servers are in a HyperV cluster.

    I would guess to offload any vms from one of the hosts and take out of the cluster for maintenance mode.   Upgrade that server but will it balk when you try to take out of maintenance mode and "rejoin" the cluster?

    Got a 4 host cluster to bump up to datacenter on each host.

  31. Todd Jones says:

    found a post that says go for it

    social.technet.microsoft.com/…/4ff295fc-496f-4c99-9d60-e9219f482ecf

    Thank you Damir Bersinic for pointing me to it.

  32. Ron Vink says:

    If I have a Windows Server 2008 R2 Foundation SP1 OEM and want to migrate it to Standard what type of license should I purchase to obtain a valid Key to allow for the DISM type of migrate?

  33. Dave Schuck says:

    Finally had a chance to try this and it worked great. Thanks!

  34. BobMay says:

    I have similar question as Ron Vink, want to upgrade oem 2008 R2 Foundation server to 2008 R2 Standard.  Just buy Standard R2 online, get key and use DISM?  Any help appreciated…im thinking about trying this without calling an outside IT person but don't want to crash the place!?

  35. jmr says:

    What if the machine you are trying to upgrade from Standard to Enterprise IS the KMS host server for the domain?  We use MAK for most servers, but do happen to have a KMS host, which happens to be the server I need to upgrade from Standard to Enterprise to take advantage of more than 32GB of RAM.

  36. KMW says:

    For the MAK license you can run the DISM command with the generic KMS client activation keys, and then before you reboot run the following commands. It worked GREAT!

    1. Open the command prompt and change working directory to System32 directory
    2. Type in slmgr.vbs -ckms (this clears and KMS entry you may have)
    3. Type slmgr.vbs -upk (this removes any product key installed)
    4. Type slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx (where the x’s is the new product key you want to use )
    5. Type slmgr.vbs -ato (this activates the server)

  37. swagata says:

    i have windows 2008 r2 ent. I have 2 servers on cluster. i need to upgrade the server to datacenter. please tel me how do i go?

  38. RandyP says:

    When you refer to a Product Key, do I use the key for the exiting installation or the key for the upgraded OS?

  39. Mayur Shah says:

    Hello, Requirement: To upgrade one of the DC from STD to datacenter edition. Scenariio: I would like to tell you that we have one xyz domain and have three (a, b, c) domain controllers for xyz domain with DNS integrated on the same. On B DC currently i
    do not have any FSMO role avaialbale on the server, but has DNS role installed on it (DNS role installed on all the three servers), I learnt from your blog i need to demote the DC first and then again promote it back to the DC, would be interested in above
    scenario do i have to take any special care related to DNS and Domain controller.

  40. Mayur Shah says:

    Hello, Requirement: To upgrade one of the DC from STD to datacenter edition. Scenariio: I would like to tell you that we have one xyz domain and have three (a, b, c) domain controllers for xyz domain with DNS integrated on the same. On B DC currently i
    do not have any FSMO role avaialbale on the server, but has DNS role installed on it (DNS role installed on all the three servers), I learnt from your blog i need to demote the DC first and then again promote it back to the DC, would be interested in above
    scenario do i have to take any special care related to DNS and Domain controller.

  41. Yuriy says:

    I have a Windows Server 2008 R2 Foundation SP1 OEM and I want to migrate it to Standard. I have a license key for Standart Edition. But i have – error 50. My server not DC. Please help me. Thank you.

  42. Yuriy says:

    I have solution – i found the other key – and all right !!!
    Thanks to yourself !!!

  43. Daniel says:

    Quick question, i have window foundation 2008 with active directory domain services, i need to remove the active directory to do the upgrade to window server standart?
    Or active directory is not the same as DC?

  44. Huseyin says:

    Hi Brendan,

    Thanks for post, very helpful. I2ve done successfully.

  45. Richard says:

    Good post.
    Worked like a charm for us, successfully upgraded a Windows 2008 R2 std to enterprise with DISM.

    Thanks!

  46. Hasan Reza says:

    Excellect article , saved one day, Regards.

  47. ILYAS says:

    Hey, I am trying to use this command to Convert windows 2008 r2 Standard to Enterprise, I have exchange install on this server (No database copy) will it harm anything to exchange.

  48. gbkhor says:

    Thanks, it work for me as well using DISM /online /Set-Edition:ServerDatacenter /productkey:74YFP-3QFB3-KQT8W-PMXWJ-7M648

  49. tosin says:

    I’m trying dis nw it aint woking

  50. yosef says:

    i’m tried to upgrade server 2008 r2 standard to enterprise and i have got this error

    Error: 50
    Setting an Edition is not supported with online images.

    this is the log file

    2015-03-29 14:32:29, Error DISM DISM Transmog Provider: PID=3556 GetProductType: Error [0x80070002] retrieving current ProductType value. – CTransmogManager::GetProductType
    2015-03-29 14:32:29, Error DISM DISM Transmog Provider: PID=3556 Setting an Edition is not supported online. – CTransmogManager::ExecuteCmdLine
    2015-03-29 14:32:29, Error DISM DISM Transmog Provider: PID=3556 [Upgrading system]: Setting an Edition is not supported with online images.
    [hrError=0x80070032] – CTransmogManager::EventError

    i’m already uninstalled the active directory dhcp and the dns but nothing helped me

    please help me

  51. Susan White says:

    If someone need windows key can click link
    https://www.facebook.com/Download-Windows-7-For-Free-1668217453413894 to got. It provide 100% working.

  52. Juan Ortiz says:

    Hi Brendan, nice post this one, one question, it’s possible to make the upgrade to a VMWARE virtual Windows Server 2008 R2 Standard?

  53. central government jobs says:

    Thanks for the information.
    http://indguru.com