How can I get the processor "SocketDesignation" with Get-CimInstance?

479 Views Asked by At

Since wmic calls are deprecated by Microsoft, how can I use Get-CimInstance to get the same information as wmic cpu get SocketDesignation?

2

There are 2 best solutions below

3
Lance U. Matthews On BEST ANSWER

The Win32_Processor class has a SocketDesignation property. This command produces the same result for me:

(Get-CimInstance -ClassName 'Win32_Processor' -Property 'SocketDesignation').SocketDesignation

Alternatively, you can use the Get-ComputerInfo cmdlet to get instances of the Processor class, which also have a SocketDesignation property:

(Get-ComputerInfo -Property 'CsProcessors').CsProcessors.SocketDesignation

In both commands, the -Property parameter is selecting specific properties, instead of all available, to be present in the result.

To get the same data as wmic memorychip list full you would query, as above, for instances of the CIM_PhysicalMemory class or the Win32_PhysicalMemory class (the latter inherits from the former). A good way to find the WMI class that contains particular properties is to take a seemingly-unique property name, say BankLabel, and search for it on learn.microsoft.com to see what classes are returned.

0
malachi On

you can simply type the following command.

(Get-CimInstance CIM_Processor).SocketDesignation