Firstly, extend volume with Diskpart.exe
To extend volume with diskpart.exe, you just need to open up Command line utility with Administrators rights (Start -> right click CMD and choose run as administrator). Type Diskpart and the utility fires up.
- Open a command prompt and type diskpart.
- At the DISKPART prompt, type list volume. Make note of the basic volume you want to extend.
- At the DISKPART prompt, type select volume <volumenumber>. This selects the basic volume volumenumber that you want to extend into contiguous, empty space on the same disk.
- At the DISKPART prompt, type extend [size=<size>]. This extends the selected volume by size megabytes (MB).
Moreover, you can use this commands like: Delete partition, Format and more – you can read further on over here.