Scenario: You downloaded the evaluation copy of Windows Server and you have 180 days to test out whatever you are working on. Fast forward a few months and you only have a few days left and you are so happy with how it works, you go out and buy the whole license key. When you go to apply the license key under System, you get a big ol’ error that says: “This edition cannot be upgraded.”
You can use the DISM tool to figure out what versions of Windows Server you can upgrade to, and also use the tool to help change the product key of the version installed.
Easy enough, let’s go ahead and open up command prompt as an administrator (right click on windows flag/start icon, Command Prompt (Admin):
Execute the following command to find out what versions you can upgrade to:
Dism /Online /Get-TargetEditions
In this case, you can see I can upgrade to ServerStandard or ServerDatacenter
Next, let’s go ahead and actually upgrade the edition and inject my license key:
Dism /Online /Set-Edition:TheEditionListedYouWantToGoTo /AcceptEula /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Viola! At this point, I simply need to reboot and my instance will be upgraded accordingly.
Copied right from Microsoft’s KB, here is how to extend a partition/disk.
- At a command prompt, type diskpart.exe.
- Type list volume to display the existing volumes on the computer.
- Type Select volume volume number where volume number is number of the volume that you want to extend.
- Type extend [size=n] [disk=n] [noerr]. The following describes the parameters:
- The space, in megabytes (MB), to add to the current partition. If you do not specify a size, the disk is extended to use all the next contiguous unallocated space.
- The dynamic disk on which to extend the volume. Space equal to size=n is allocated on the disk. If no disk is specified, the volume is extended on the current disk.
- For scripting only. When an error is thrown, this parameter specifies that Diskpart continue to process commands as if the error did not occur. Without the noerr parameter, an error causes Diskpart to exit with an error code.
- Type exit to exit Diskpart.exe.
When the extend command is complete, you should receive a message that states that Diskpart successfully extended the volume. The new space should be added to the existing drive while maintaining the data on the volume.
The original KB article can be found here: http://support.microsoft.com/kb/325590