GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bytecode-api/BytecodeApi.Wmi at master · bytecode77/bytecode-api

Expand file tree

/

BytecodeApi.Wmi

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

BytecodeApi.Wmi

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
.nuget
.nuget
 
 
Properties
Properties
 
 
BytecodeApi.Wmi.csproj
BytecodeApi.Wmi.csproj
 
 
IWmiQueryable.cs
IWmiQueryable.cs
 
 
README.md
README.md
 
 
WmiClass.cs
WmiClass.cs
 
 
WmiContext.cs
WmiContext.cs
 
 
WmiIterator.cs
WmiIterator.cs
 
 
WmiNamespace.cs
WmiNamespace.cs
 
 
WmiObject.cs
WmiObject.cs
 
 
WmiProperty.cs
WmiProperty.cs
 
 
WmiPropertyCollection.cs
WmiPropertyCollection.cs
 
 
WmiQueryBuilder.cs
WmiQueryBuilder.cs
 
 

README.md

Outline

BytecodeApi.Wmi

Library for efficient WMI querying.

Examples

BytecodeApi.Wmi

Retrieve list of WMI objects by reading entire table:

WmiObject[] processes = WmiContext.Root
	.GetNamespace("CIMV2")
	.GetClass("Win32_Process")
	.ToArray();

foreach (WmiObject process in processes)
{
	// Retrieve properties for each WmiObject
	Console.WriteLine(process.Properties["Name"].Value);
	Console.WriteLine(process.Properties["CommandLine"].Value);
}

Retrieve one WMI object:

WmiObject? process = WmiContext.Root
	.GetNamespace("CIMV2")
	.GetClass("Win32_Process")
	.Where("ProcessId = 4")
	.FirstOrDefault();

string? caption = process?.Properties["Caption"].GetValue<string>();

Retrieve all classes from a namespace:

WmiClass[] classes = WmiContext.Root
	.GetNamespace("CIMV2")
	.GetClasses();

Retrieve all namespaces from a namespace:

WmiNamespace[] namespaces = WmiContext.Root
	.GetNamespaces();

Changelog

5.0.0 (15.02.2026)

  • change: Targeting .NET 10.0

4.0.0 (15.09.2025)

  • change: Targeting .NET 9.0

3.0.0 (08.09.2023)

  • Initial release
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.