I have an azure virtual machine and due to a broken backup script, it has previously used the entire 127GB of space. My virtual machine is now only using 20GB however I'm still being charged for the full 127GB.
I know I need to trim the disk and in windows 2012 it's a simple case of running in PowerShell:
Optimize-Volume -DriveLetter C -ReTrim -Verbose
But how do I do this in Windows 2008R2?