Hi!
I have multiple volumes (as nearly everybody nowadays): on Windows they end up specified as C:, D: and so on. How do I list these all like on a Unix machine with "ls /mnt/" with Powershell?
Hi!
I have multiple volumes (as nearly everybody nowadays): on Windows they end up specified as C:, D: and so on. How do I list these all like on a Unix machine with "ls /mnt/" with Powershell?
To get all of the file system drives, you can use the following command:
gdr | where {$_.Provider.Name -eq "FileSystem"}
gdr
is an alias for Get-PSDrive
, which includes all of the "virtual drives" for the registry, etc.
Firstly, on Unix you use mount
, not ls /mnt
: many things are not mounted in /mnt
.
Anyhow, there's the mountvol
DOS command, which continues to work in Powershell, and there's the Powershell-specific Get-PSDrive
.