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 ?
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 ?
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.