locked
wmi classes RRS feed

  • Question

  • Hi,

    When I want to use get-wmiobject I usually need to quess the class name. Get-WMIObject -Class win32_bios. Is there a way to see the list of all win32 clasess so that I don't need to quess all the time or look on the internet to find right one? 

    Thursday, October 12, 2017 7:00 AM

Answers

  • Hi,

    Get-WMIObject -List| Where{$_.name -match "Win32_"} | Sort Name | Ft name


    Please remember to mark the replies as answers if they help.,

    NEDIMMEHIC.ORG

    • Marked as answer by Quantum5 Thursday, October 12, 2017 8:03 AM
    Thursday, October 12, 2017 7:04 AM
  • There are thousands of WMI classes.  You need to go to the forum for the names space you are trying to use.

    https://msdn.microsoft.com/en-us/library/aa394554(v=vs.85).aspx

    You can also list all classes for a namespace.

    Get-WmiObject -list * -NameSpace root\wmi (2002 classes)
    Get-WmiObject -list * -NameSpace root (10000+ classes)
    Get-WmiObject -List * -(1430+ classes)


    \_(ツ)_/

    • Marked as answer by Quantum5 Thursday, October 12, 2017 8:03 AM
    Thursday, October 12, 2017 7:27 AM

All replies

  • There are thousands of WMI classes.  You need to go to the forum for the names space you are trying to use.

    https://msdn.microsoft.com/en-us/library/aa394554(v=vs.85).aspx

    You can also list all classes for a namespace.

    Get-WmiObject -list * -NameSpace root\wmi (2002 classes)
    Get-WmiObject -list * -NameSpace root (10000+ classes)
    Get-WmiObject -List * -(1430+ classes)


    \_(ツ)_/

    • Marked as answer by Quantum5 Thursday, October 12, 2017 8:03 AM
    Thursday, October 12, 2017 7:27 AM
  • List works like this:

    Get-WmiObject -List Cim-*


    \_(ツ)_/

    Thursday, October 12, 2017 8:05 AM