Triogap.System.Management.Types 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Triogap.System.Management.Types --version 0.1.0
                    
NuGet\Install-Package Triogap.System.Management.Types -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Triogap.System.Management.Types" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Triogap.System.Management.Types" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Triogap.System.Management.Types" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Triogap.System.Management.Types --version 0.1.0
                    
#r "nuget: Triogap.System.Management.Types, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Triogap.System.Management.Types@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Triogap.System.Management.Types&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Triogap.System.Management.Types&version=0.1.0
                    
Install as a Cake Tool

System.Management.Types

Provides strongly-typed C# representations of WMI and system/network management objects for use in .NET applications. This project supplies type definitions and code generation utilities to enable type-safe access to management data.

Features

  • Strongly-typed C# classes for WMI and system/network management objects
  • Auto-generated types for common WMI classes (e.g., Win32_Process, Win32_OperatingSystem)
  • Designed for use with management APIs and LINQ providers
  • Simplifies working with management data by providing compile-time type checking

Getting Started

Prerequisites

  • .NET 8.0 or .NET 9.0 SDK
  • Windows OS with Windows Management Instrumentation (WMI) enabled

Installation

Clone the repository: git clone https://github.com/Triogap/System.Management.Linq.git

Usage

Note: Running WMI queries may require elevated permissions.

Here's an example of how to check if an explorer process is running on the system:

using System.Management;
using System.Management.Types.Win32;
using System.Management.Types;

var searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Process WHERE Name LIKE 'Explorer%'");
var process = InstanceFactory.CreateInstances<Process>(searcher.Get()).FirstOrDefault();

if (process != null)
{
    Console.WriteLine($"Explorer process is running with ProcessId: {process.ProcessId}");
}
else
{
    Console.WriteLine("Explorer process is not running.");
}

Contributing

Contributions are welcome! Please open issues and submit PRs for improvements or bug fixes.

License

This project is licensed under the MIT License.


Maintained by Triogap

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net9.0-windows7.0 is compatible.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Triogap.System.Management.Types:

Package Downloads
Triogap.System.Management.Linq

LINQ extensions and query helpers for System.Management, depends on System.Management.Types.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 223 5/29/2025
0.1.0 222 5/29/2025

Initial release.
     Includes 225 strongly-typed WMI types in the Win32 namespace like Win32_Process.
     Only properties can be read in this version; write operations and methods are not supported.