PowerShell script for CPU information, incl. CPUID Solved

Page 4 of 7 FirstFirst ... 23456 ... LastLast
  1.    #31

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

    You're most welcome!
      My ComputerSystem Spec

  2.    #32

    @ddelo FYI, my motherboard should be LGA1150, but what's the meaning behind the upgrade method?
    Attached Thumbnails Attached Thumbnails Untitled.png  
      My ComputerSystem Spec

  3.    #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 ComputerSystem Spec

  4.    #34

    @ddelo 36
      My ComputerSystem Spec

  5.    #35

    khanmein said: View Post
    @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 ComputerSystem Spec

  6.    #36

    ddelo said: View Post
    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 ComputerSystem Spec


  7. Cliff S's Avatar
    Posts : 24,790
    Win10 Pro, Win10 Pro N, Win10 Home, Win10 Pro Insider Fast Ring, 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"

    Click image for larger version. 

Name:	image.png 
Views:	3 
Size:	176.0 KB 
ID:	234855
    Last edited by Cliff S; 4 Weeks Ago at 07:31.
      My ComputersSystem Spec

  8.    #38

    Cliff S said: View Post
    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"

    Click image for larger version. 

Name:	image.png 
Views:	3 
Size:	176.0 KB 
ID:	234855
    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 ComputerSystem Spec

  9. Cliff S's Avatar
    Posts : 24,790
    Win10 Pro, Win10 Pro N, Win10 Home, Win10 Pro Insider Fast Ring, Windows 8.1 Pro, Ubuntu
       #39

    ddelo said: View Post
    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 ComputersSystem Spec

  10.    #40

    Cliff S said: View Post
    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 ComputerSystem Spec


 
Page 4 of 7 FirstFirst ... 23456 ... LastLast

Related Threads
The PowerShell script execution policies enables you to determine which Windows PowerShell scripts (if any) will be allowed to run on your computer. Windows PowerShell has four different execution policies: Execution Policy Description ...
One of many PowerShell security features is that you can't run a script simply by double clicking it's icon on desktop or in a folder. Doing so will by default open script in Notepad for editing instead. You can right click script and select Run...
A Powershell Script for HandBrake in Software and Apps
Here's the thing. My system is an age-old i3-530 overclocked to 3.5GHz coupled with GTX 1050 2GB. I have around 1.5TB of tutorial videos that I have to encode due to dearth in HDD space. I want to encode the videos while keeping the folder and...
Hope I'm in the right place! I am trying to get a Powershell script to run daily in the task scheduler. It basically purges a folder on one of my drives: Get-ChildItem –Path “D:\Dropbox\Quicken\Backup” –Recurse | Where-Object CreationTime...
A .ps1 script file is a text file that contains one or more Windows PowerShell commands or expressions. A .ps1 file will open with Notepad by default. To run a .ps1 file with PowerShell, you would right click or press and hold on the .ps1 file and...
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:47.
Find Us