Skip to content

Add Powershell Command to List all Mounted Devices. #13752

@JaroslavMitrovic

Description

@JaroslavMitrovic

Is your feature request related to a problem? Please describe.
No it is not an Problem.

Describe the solution you'd like
I would like to have a PowerShell/CLI/WSL Command where I can determine if Drives on Windows are Mounted to WSL.

Describe alternatives you've considered
Testing all mounts by using wsl --mount \\eachofthedrives, to see if the Command fails.

Additional context
I am creating me an WPF-Application to mount my Linux formatted Drives into WSL, for that I use PowerShell SDK, to send the wsl --mount \\.\PHYSICALDRIVE# --partition # and mount it into my Distribution. I already list all Physical Drives and I want to exclude the already mounted ones. But I can overcome my Issue by an If-Statement if I want to.
Also, I have a lot of Linux formatted SD-Cards, that I want to get some Files read out in Windows (kinda) .

Did I miss the Command for Listing all Mounted Drives? If so, please close this before someone reads it ... pssst

Thanks in advance and greetings from Hamburg, Germany.

Edit: Do I really need a Log-File?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions