Getting Processor Name and NumberOfCores in PowerShell 2.0

Welcome Forums General PowerShell Q&A Getting Processor Name and NumberOfCores in PowerShell 2.0

This topic contains 5 replies, has 2 voices, and was last updated by

 
Participant
1 year, 3 months ago.

  • Author
    Posts
  • #73754

    Participant
    Points: 0
    Rank: Member

    Yes, I know we should upgrade... Unfortunately, I'm auditing a number of client servers that are in production and can't be taken down for the reboot to upgrade PowerShell. I'm trying to display just the name and number of cores for the Processor. I can see them both in the list when I run

    Get-WmiObject Win32_processor

    but when I run

    (Get-WmiObject Win32_processor).Name

    or

    (Get-WmiObject Win32_processor).NumberofCores

    I don't get any results. This works in other versions... What am I doing wrong in 2.0

  • #73759

    Participant
    Points: 8
    Rank: Member
    Get-WmiObject Win32_processor | Select-Object -Property Name,NumberofCores

    ... client servers that are in production and can't be taken down for the reboot to upgrade PowerShell ...

    How do you install updates / patches??

    • #73762

      Participant
      Points: 0
      Rank: Member

      We schedule times with the clients for this... This is for an internal audit that the client has nothing to do with. I just need to gather the information... I have hundreds of servers I need to get through right now and just trying to find a way to gather this info quickly. If they were all on the same network it would be easy and I could just use a test server that has a newer version of PS, but that's not an option right now.

    • #73763

      Participant
      Points: 8
      Rank: Member

      OK ... did you try the code snippet I posted?

    • #73768

      Participant
      Points: 0
      Rank: Member

      I did, and it worked, thank you!

  • #73771

    Participant
    Points: 8
    Rank: Member
          _
         /(|
        (  :
       __\  \  _____
     (____)  `|
    (____)|   |
     (____).__|
      (___)__.|_____

The topic ‘Getting Processor Name and NumberOfCores in PowerShell 2.0’ is closed to new replies.