Skip to content

Instantly share code, notes, and snippets.

@therevoman
Created July 5, 2022 19:12
Show Gist options
  • Save therevoman/82b2e0a03939dd7b02389604158f4b30 to your computer and use it in GitHub Desktop.
Save therevoman/82b2e0a03939dd7b02389604158f4b30 to your computer and use it in GitHub Desktop.
echo "Finding drive with name that contains 'MP600'"
$device_id = (GET-CimInstance -query "SELECT deviceid from Win32_DiskDrive WHERE Caption like '%MP600%'").DeviceID
echo "Mounting drive $device_id to WSL"
C:\Users\nrevo\AppData\Local\Microsoft\WindowsApps\wsl.exe --mount $device_id --bare
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment