To extend a partition or volume, you must first select the volume to give it the focus, and then you can specify how large to make the extension. To extend a volume, follow these steps:
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 . The following describes the parameters: size=n
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.
VCP 310,VCP 410,MCSE
Consider awarding points for "helpful" and/or "correct" answers.
It is complicated. You can easily extend virtual disk (vmdk) as mentioned above.
But! Windows can not extend dynamic volumes, you can only create new partition on free space and add it to existing volume.
Only tool I heard that is capable to work with dynamic volumes is Paragon something. But I haven't used if myself.
MCSA, MCTS Hyper-V, VCP 3/4, VMware vExpert '2009