List all devices, partitions and volumes in Powershell

后端 未结 9 976
时光取名叫无心
时光取名叫无心 2021-01-30 19:53

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/\" wi

9条回答
  •  眼角桃花
    2021-01-30 20:42

    To get all of the file system drives, you can use the following command:

    gdr -PSProvider 'FileSystem'
    

    gdr is an alias for Get-PSDrive, which includes all of the "virtual drives" for the registry, etc.

提交回复
热议问题