PowerShell script for CPU information, incl. CPUID

Page 4 of 14 FirstFirst ... 23456 ... LastLast

  1. Posts : 2,450
    Windows 10 Pro x64
    Thread Starter
       #31

    Jhawk55 said:
    @ddelo
    Just wanna say thank you...

    You're most welcome!
      My Computer


  2. Posts : 297
    Windows 10 Pro x64
       #32

    @ddelo FYI, my motherboard should be LGA1150, but what's the meaning behind the upgrade method?
    Attached Thumbnails Attached Thumbnails PowerShell script for CPU information, incl. CPUID-untitled.png  
      My Computer


  3. Posts : 2,450
    Windows 10 Pro x64
    Thread Starter
       #33

    @khanmein

    Socket method is the motherboard's upgrade ability. I.e the type of CPUs it can accept if you want to change your CPU to a newer one.
    More info here:
    https://www.howtogeek.com/348571/how...board-or-both/

    As for the LGA1150/LGA1155 I will check it and get back to you.
    To help me out, would it be possible to run the following command

    Code:
    Get-CimInstance -Class CIM_Processor | Select-Object UpgradeMethod
    and post the number it gives you?
      My Computer


  4. Posts : 297
    Windows 10 Pro x64
       #34

    @ddelo 36
      My Computer


  5. Posts : 2,450
    Windows 10 Pro x64
    Thread Starter
       #35

    khanmein said:
    @ddelo 36
    Thanks... now the details.
    You're right. According to Intel it should have been LGA1150.
    But apparently the CPU reports erroneously as 36, which according to the latest DMTF CIM schema, since it's reporting 36 is LGA1155.
    Mind you that the DMTF (Distributed Management Task Force) CIM schema is the reference for all Manufacturers and OS developers, incl. Microsoft.
    So to make a long story short, Intel erroneously reports the CPU's UpgradeMethod and since the script reads what the CPU reports, it matches it with the DMTF value and gives you the result....
    Please blame Intel, not me....
      My Computer


  6. Posts : 297
    Windows 10 Pro x64
       #36

    ddelo said:
    Thanks... now the details.
    You're right. According to Intel it should have been LGA1150.
    But apparently the CPU reports erroneously as 36, which according to the latest DMTF CIM schema, since it's reporting 36 is LGA1155.
    Mind you that the DMTF (Distributed Management Task Force) CIM schema is the reference for all Manufacturers and OS developers, incl. Microsoft.
    So to make a long story short, Intel erroneously reports the CPU's UpgradeMethod and since the script reads what the CPU reports, it matches it with the DMTF value and gives you the result....
    Please blame Intel, not me....
    Thanks for your explanation.
      My Computer


  7. Posts : 27,162
    Win11 Pro, Win10 Pro N, Win10 Home, Windows 8.1 Pro, Ubuntu
       #37

    Dimitry I had to add, from the older version the BIOS/UEFI one to, as it is always good to see if both are the same or not.

    # Find and output the Currently running CPU microcode revision
    $CPURegistryPath = "Registry::HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0"
    $biosMicrocode = (Get-ItemProperty -Path $registrypath )."Previous Update Revision"
    $biosMicrocodeInHex = (-join ( $biosMicrocode[0..4] | foreach { $_.ToString("X2") } )).TrimStart('0')

    $RunningMicrocode = (Get-ItemProperty -Path $CPURegistryPath)."Update Revision" -join ''
    $RunningMicrocodeHEX = ([String]::Format("{0:x2}", [int](($RunningMicrocode.ToString()).TrimStart('0')).TrimEnd('0'))).ToUpper()

    # CPU Microcode currently installed in BIOS/UEFI
    Write-Output "$('BIOS/UEFI Microcode revision'.PadRight(29)): 0x$biosMicrocodeInHex"

    # CPU Microcode currently running on the system
    Write-Output "$('Running microcode revision'.PadRight(29)): 0x$RunningMicrocodeHEX`n"

    PowerShell script for CPU information, incl. CPUID-image.png
    Last edited by Cliff S; 24 May 2019 at 07:31.
      My Computers


  8. Posts : 2,450
    Windows 10 Pro x64
    Thread Starter
       #38

    Cliff S said:
    Dimitry I had to add, from the older version the BIOS/UEFI one to, as it is always good to see if both are the same or not.

    # Find and output the Currently running CPU microcode revision
    $CPURegistryPath = "Registry::HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0"
    $biosMicrocode = (Get-ItemProperty -Path $registrypath )."Previous Update Revision"
    $biosMicrocodeInHex = (-join ( $biosMicrocode[0..4] | foreach { $_.ToString("X2") } )).TrimStart('0')

    $RunningMicrocode = (Get-ItemProperty -Path $CPURegistryPath)."Update Revision" -join ''
    $RunningMicrocodeHEX = ([String]::Format("{0:x2}", [int](($RunningMicrocode.ToString()).TrimStart('0')).TrimEnd('0'))).ToUpper()

    # CPU Microcode currently installed in BIOS/UEFI
    Write-Output "$('BIOS/UEFI Microcode revision'.PadRight(29)): 0x$biosMicrocodeInHex"

    # CPU Microcode currently running on the system
    Write-Output "$('Running microcode revision'.PadRight(29)): 0x$RunningMicrocodeHEX`n"

    PowerShell script for CPU information, incl. CPUID-image.png
    Cliff, you don't have to do that.
    When I get home, hopefully sometime tonight I'll pm you the previous version.
    Now, the story behind the change, is that I haven't found a reliable way to get the microcode revision currently loaded in the BIOS. The value the script was presenting as the BIOS loaded microcode was from the Registry, which was proven unreliable, as in some machines this value was not the correct one.
    In your system (in mine too) the BIOS/UEFI microcode revision seems to be the correct one...not to all machines though.
    So, instead of presenting a questionable value, I decided to show the microcode revision currently running, which might be the one from BIOS (if it's up to date) or one loaded by a Microsoft update. At least until such time, when I can find another way to get the BIOS revision from another than the registry source.
    (Any suggestion towards that goal, is more than welcome!)
      My Computer


  9. Posts : 27,162
    Win11 Pro, Win10 Pro N, Win10 Home, Windows 8.1 Pro, Ubuntu
       #39

    ddelo said:
    Cliff, you don't have to do that.
    When I get home, hopefully sometime tonight I'll pm you the previous version.
    Now, the story behind the change, is that I haven't found a reliable way to get the microcode revision currently loaded in the BIOS. The value the script was presenting as the BIOS loaded microcode was from the Registry, which was proven unreliable, as in some machines this value was not the correct one.
    In your system (in mine too) the BIOS/UEFI microcode revision seems to be the correct one...not to all machines though.
    So, instead of presenting a questionable value, I decided to show the microcode revision currently running, which might be the one from BIOS (if it's up to date) or one loaded by a Microsoft update. At least until such time, when I can find another way to get the BIOS revision from another than the registry source.
    (Any suggestion towards that goal, is more than welcome!)
    I have both versions, that's how I made the change.
    I tried then to make it an executable(for the heck of it), I never tried that befoe, using PS2EXE-GUI: "Convert" PowerShell Scripts to EXE Files with GUI but the output was one line per popup window, you need to pipe it according to how many lines the output is, and I can't script, only copy paste what looks about right to me

    GUI mode output formatting:
    Per default in powershell outputs of commandlets are formatted line per line (as an array of strings). When your command generates 10 lines of output and you use GUI output, 10 message boxes will appear each awaiting for an OK. To prevent this pipe your command to the comandlet Out-String. This will convert the output to one string array with 10 lines, all output will be shown in one message box (for example: dir C:\ | Out-String).
    I tried for 2 hours then gave up, I wanted to surprise you with it.
      My Computers


  10. Posts : 2,450
    Windows 10 Pro x64
    Thread Starter
       #40

    Cliff S said:
    I have both versions, that's how I made the change.
    I tried then to make it an executable(for the heck of it), I never tried that befoe, using PS2EXE-GUI: "Convert" PowerShell Scripts to EXE Files with GUI but the output was one line per popup window, you need to pipe it according to how many lines the output is, and I can't script, only copy paste what looks about right to me



    I tried for 2 hours then gave up, I wanted to surprise you with it.

    You did.....hahahaha
    Check your messages!

    BTW I don't trust these PS2EXE and BAT2EXE apps. They tend to mess things up, although quite useful for people who don't like (or know) Command prompt and PowerShell.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:04.
Find Us




Windows 10 Forums