What is the command to reset a Windows installation without deleting any files

After searching for a whole hour I found the solution: sysprep.

Enter this is in the command line and it will shutdown your PC after confirming. The next time you start your PC it will look like a fresh install.