Simulate low disk space

Recently I had to test the application we were developing under low disk space conditions.

A rather hard test environment to set up if you have about 200GB left on your hard drive.

Fortunately I have found the fsutil.exe program under C:\Windows\System32.

The following Powershell command helped me a lot to setup the required test environment.

C:\Windows\System32\fsutil.exe file createnew C:\Temp\temp.tmp (199GB)

And thus my hard drive was ‘completely stuffed’ in almost no time.