PowerTip: Use PowerShell to List Top-Level WMI Namespaces

PowerTip: Use PowerShell to List Top-Level WMI Namespaces

  • Comments 1
  • Likes

Summary: Use Windows PowerShell to list top-level WMI namespaces.

Hey, Scripting Guy! Question How can I use Windows PowerShell to list the top-level WMI namespaces?

Hey, Scripting Guy! AnswerUse the Get-WmiObject cmdlet or the Get-CImInstance cmdlet and query for __NameSpace:

Windows PowerShell 2.0 syntax:

Get-WmiObject __NameSpace | select name

 

Windows PowerShell 3.0 syntax:

Get-CimInstance __NameSpace | select name

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • I believe this gives a better output

    Get-WmiObject -Namespace root -class __NameSpace | Select Name