get physical drives info

Peter Volz 1,295 Reputation points
2023-07-29T13:10:15.8566667+00:00

Hello

I need to get the list of physical drives (not partition volumes) with their model name

For example I have 2 disks installed, one Samsung SSD and one portable external HDD

I've seen some ManagementObject/Searcher samples for partitions, but not for the physical disks only :(

Any help? :)

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,279 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,778 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 86,881 Reputation points
    2023-07-29T14:15:42.7733333+00:00

    On my PC, I get physical drives with Win32_DiskDrive


1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

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