Search code examples
powershellvolumesveracrypt

`Get-Volume` does not list system favorite volumes mounted by VeraCrypt


I have a Windows 10 Pro (v1903) machine setup with 2 SSDs and full disk encryption by VeraCrypt. The second SSD is mounted as a system favorite volume, so that I only have to provide one password/key at boot and both SSDs will be mounted successfully.

In Windows Explorer, both SSDs are listed as usual with drive letters and everything looks fine. But in the Disk Management console, the second SSD is listed without a drive letter and as RAW.

Issuing Get-Volume in an elevated PowerShell (v5.1) will not list the second SSD even if I can see it in the Windows Explorer with a drive letter.

How can I really list all volumes using PowerShell?


Solution

  • It turns out that the good old WMI is able to really list all volumes:

    Get-WmiObject -Class Win32_Volume | Select-Object -Property DriveLetter, Label, FileSystem, DriveType, FreeSpace, Capacity | Format-Table
    

    or newer:

    Get-CimInstance -ClassName Win32_Volume | Select-Object -Property DriveLetter, Label, FileSystem, DriveType, FreeSpace, Capacity | Format-Table