How can I create a file to fill up the disk via cmd?
The following powershell command get the free space of the disk using WMI then use fsutil to create the newfile. Don't forget to change the volume name if it's necessary.
$space = $(get-WmiObject win32_logicaldisk | where-object -Property DeviceID -EQ "C:" | select -ExpandProperty FreeSpace) ; fsutil file createNew yourFileName $space