Created
November 30, 2021 18:29
-
-
Save webtroter/0af5d3346f2358bb27005058d9625542 to your computer and use it in GitHub Desktop.
Fill Disk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FillDisk { | |
param ( | |
$FillLimit = 20MB | |
) | |
$remaining = (Get-Volume C | Select-Object -ExpandProperty SizeRemaining) - $FillLimit | |
$filename = "vss-block_{0}G.dummy" -f ([math]::Round($remaining/1GB, 2)) | |
& fsutil file createnew $filename $([math]::Floor($remaining)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment