2

Is there any command to get the "clock cycle" in ghz using powershell command ? I can get the maxspeed using below command.

$maxClockSpeed = (get-wmiobject Win32_Processor | select-object -first 1).MaxClockSpeed

Is it the same ?

H. Pauwelyn
  • 13,575
  • 26
  • 81
  • 144
Pradeep Shanbhag
  • 437
  • 5
  • 8
  • 19

1 Answers1

0

Yes, it is the same: What is a clock cycle and clock speed?

Clock Cycle is the speed of a computer processor or CPU, is determined by the clock cycle, which is the amount of time between two pulses of an oscillator. Generally speaking, the higher number of pulses per second, the faster the computer processor will be able to process information.

You can retrieve the current CurrentClockSpeed the same way you did for MaxClockSpeed.

$strComputer = "." 
$colItems = Get-WmiObject -class "Win32_Processor" -namespace "root/CIMV2" -computername $strComputer 

foreach ($objItem in $colItems) { 
    Write-Host 
    Write-Host "CPU ID: " -foregroundcolor yellow -NoNewLine 
    Write-Host $objItem.DeviceID -foregroundcolor white 
    Write-Host "CPU Model: " -foregroundcolor yellow -NoNewLine 
    Write-Host $objItem.Name -foregroundcolor white 
    Write-Host "CPU Cores: " -foregroundcolor yellow -NoNewLine 
    Write-Host $objItem.NumberOfCores -foregroundcolor white 
    Write-Host "CPU Max Speed: " -foregroundcolor yellow -NoNewLine 
    Write-Host $objItem.CurrentClockSpeed 
    Write-Host "CPU Current Speed: " -foregroundcolor yellow -NoNewLine 
    Write-Host $objItem.MaxClockSpeed 
    Write-Host "CPU Status: " -foregroundcolor yellow -NoNewLine 
    Write-Host $objItem. the tatus 
    Write-Host 
}

The Win32_Processor class shows maximum speed and the current speed of the processor in MHz.

wp78de
  • 18,207
  • 7
  • 43
  • 71
  • Thanks buddy, but what is the unit for it , when I ran it shows as below. CPU ID: CPU0 CPU Model: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz CPU Cores: 2 CPU Max Speed: 2277 CPU Current Speed: 2301 CPU Status: OK Is it Ghz ? – Pradeep Shanbhag Jan 08 '18 at 12:57