Do you remember old days, when we used to have Format.exe to create and format partitions? Good old days! Huh! after that comes the GUI, afterwards that everything is done by mouse clicks :D.
In windows8 and later version of it, PowerShell included a cmdlet Format-Volume, which format the new or existing partition. Cool!
You can use the Format-Volume in lot's of way, but the most basic and widely use of this command is to format a partition.
The basic command to do it is :
Format-Volume -DriveLetter D -FileSystem NTFS -Full -Force
In the above command, we are formatting the D drive and formatting as a NTFS file system and by providing -Full we are asking it to fully format it ( it will take time, if you don't use the -Full parameter , it used the -quick by default).
Simple :) isn't.
To know more about the cmdlet visit : https://technet.microsoft.com/en-us/library/hh848665(v=wps.630).aspx