Skip to content

Instantly share code, notes, and snippets.

@koumaza
Last active Dec 24, 2019
Embed
What would you like to do?

wsl -- curl -L 'https://gist.githubusercontent.com/koumaza/39a046a6a912a2463b0f7c6eb9054c26/raw/84c4061c0b8e45d1758c99b06d31e32d137ac387/vhdx_cleanup.cmd' > vhdx_cleanup.cmd

@echo ---RunAs Admin---
wsl --shutdown
powershell Optimize-VHD -Path %~dp0*.vhdx -Mode Full
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment