Windows PowerShell Technique: Get CPU Information

Programming Tips-And-Tricks

Window PowerShell is indeed the richest and the most powerful tool to retrieve simple to complex information about your entire computer system. In this article we are going to walk you through a handful of PowerShell cmdlets to find out processor information on your computer. The beauty of Windows PowerShell is that it can be used by your own application and in effect enables your application to provide all this information to your users or to the internal functions of your application.

Let’s move on to Windows PowerShell. Launch Windows PowerShell as an administrator, and enter the command:


and press the Enter key.

The Windows PowerShell window displays some information about the processor on this computer as you can see in the image below.

Another means of getting system information is through Get-WmiObject cmdlet. This cmdlet can also provide the information about the remote systems on the network.

The following Get-WmiObject cmdlet provides information about the current system.

Get-WmiObject -Class Win32_Processor -ComputerName. | Select-Object -Property [a-z]*

However if you specify the computer name or its ip address with -ComputerName switch it will provide the system information of that computer.

To get only specific property values (e.g, caption and address width):

Get-WmiObject -Class Win32_Processor -ComputerName. | Select-Object -Property caption,addresswidth

You can also use Get-CimInstance cmdlet to get processor information of your computer:

Get-CimInstance -ClassName Win32_Processor

To get more generic information you can use Win32_ComputerSystem class instead of Win32_Processor

Get-CimInstance -ClassName Win32_ComputerSystem

See Also: Windows PowerShell Technique: Get Hard Drive Information

Leave a Reply

Your email address will not be published. Required fields are marked *