Share via

Get-Partition & Win32_Volume does not return all volumes and partitions on a disk

SaravanaKumar Dhamodaran 0 Reputation points
2026-02-04T09:53:09.5233333+00:00

Problem
I am using Get-Partition command & Win32_Volume class to get the list of partition and volumes in the disk. However, these commands are not returning all the volumes and partitions even though the disk management show the disks and volumes are healthy.
It is not always the case, in one scenario get-partition is not listing and on other scenario win32_volume is not listing.

Let me know what the reliable way is to get the partition and volume details without missing.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Castorix31 91,741 Reputation points
    2026-02-28T15:14:41.32+00:00

    I get same result as in Disk Management with for example :

    Get-Disk | ForEach-Object {
        $disk = $_
        Get-Partition -DiskNumber $disk.Number | ForEach-Object {
            $partition = $_
            $volume = Get-Volume -Partition $partition -ErrorAction SilentlyContinue
    
            [PSCustomObject]@{
                DiskNumber      = $disk.Number
                DiskModel       = $disk.FriendlyName
                PartitionNumber = $partition.PartitionNumber
                PartitionType   = $partition.Type
                SizeGB          = [math]::Round($partition.Size/1GB,2)
                DriveLetter     = $volume.DriveLetter
                FileSystem      = $volume.FileSystem
                VolumeLabel     = $volume.FileSystemLabel
            }
        }
    }
    
    
    0 comments No comments

  2. Jason Nguyen Tran 12,485 Reputation points Independent Advisor
    2026-02-20T01:22:54.93+00:00

    Hello SaravanaKumar Dhamodaran,

    Just checking in to see if there’s any update on this issue. If the suggestions helped resolve it, I’d appreciate it if you could click accept the answer. And feel free to reply if you need any further assistance. Have a nice day!

    0 comments No comments

  3. Jason Nguyen Tran 12,485 Reputation points Independent Advisor
    2026-02-08T02:03:18.7433333+00:00

    Hello SaravanaKumar Dhamodaran,

    I’m just following up to see if the issue has been resolved. Let me know if you need any additional information.

    If this answer was helpful, I’d really appreciate it if you could click Accept Answer. 😊


  4. Jason Nguyen Tran 12,485 Reputation points Independent Advisor
    2026-02-04T11:35:51.26+00:00

    Hello SaravanaKumar Dhamodaran,

    The behavior you’re seeing is expected in certain scenarios because Get-Partition queries the partition table directly, while Win32_Volume enumerates mounted volumes. As a result, hidden partitions, recovery partitions, or volumes without drive letters may not appear consistently across both methods. This explains why one command may list a partition while the other does not.

    I recommend using the Get-Disk and Get-Volume cmdlets together, as they provide a more complete view of both physical partitions and logical volumes. Additionally, the MSFT_DiskPartition and MSFT_Volume CIM classes (accessible via Get-CimInstance) often return more accurate results than the legacy Win32 classes. If you need to capture every partition, including hidden or system-reserved ones, querying through Get-CimInstance -Namespace root/Microsoft/Windows/Storage is the most dependable method.

    It’s also worth noting that Disk Management shows all partitions regardless of mount status, which is why it appears more comprehensive. By combining CIM queries with PowerShell cmdlets, you can achieve the same level of completeness programmatically.

    I hope this clarifies the root cause and next steps. If you find this answer helpful, please consider clicking Accept Answer 😊 so I know your concern has been resolved.

    Feel free to reply if you need any additional assistance.

    Jason.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.