System.Management 11.0.0-preview.2.26159.112
About
Provides access to a rich set of management information and management events about the system, devices, and applications instrumented to the Windows Management Instrumentation (WMI) infrastructure. Not supported on other platforms.
Key Features
- Consume Windows Management Instrumentation (WMI) data and events
- High performance extensible event mechanism
How to Use
Retrieve management information
using System.Management;
// Get the WMI class
ManagementClass managementClass = new("Win32_Processor");
// Loop through the WMI class instances and print the processor information found
foreach (ManagementObject managementObject in managementClass.GetInstances())
{
Console.WriteLine("--- Processor information ---");
Console.WriteLine($"Name: {managementObject["Name"]}");
Console.WriteLine($"Architecture: {managementObject["Architecture"]}");
}
Query management information via the SelectQuery type
using System.Management;
// Search for win32 services with a stopped state
SelectQuery selectQuery = new("Win32_Service", "State = 'Stopped'");
ManagementObjectSearcher managementObjectSearcher = new(selectQuery);
foreach (ManagementObject service in managementObjectSearcher.Get())
{
Console.WriteLine(service.ToString());
}
Main Types
The main types provided by this library are:
System.Management.ManagementClassSystem.Management.ManagementObjectSystem.Management.SelectQuery
Additional Documentation
- Conceptual documentation
- System.Management API documentation
- System.Management.ManagementClass documentation
Feedback & Contributing
System.Management is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Showing the top 20 packages that depend on System.Management.
| Packages | Downloads |
|---|---|
|
Masuit.Tools.Abstractions
Masuit.Tools基础公共库,包含一些常用的操作类,大都是静态类,加密解密,反射操作,Excel简单导出,权重随机筛选算法,分布式短id,表达式树,linq扩展,文件压缩,多线程下载和FTP客户端,硬件信息,字符串扩展方法,日期时间扩展操作,中国农历,大文件拷贝,图像裁剪,验证码,断点续传,集合扩展等常用封装。
|
19 |
|
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard.
When using NuGet 3.x this package requires at least version 3.4.
|
15 |
|
DiffEngine
Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.
|
12 |
|
DiffEngine
Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.
|
2 |
|
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard.
|
1 |
|
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
|
1 |
|
Masuit.Tools.Core
包含一些常用的操作类,大都是静态类,加密解密,反射操作,硬件信息,字符串扩展方法,日期时间扩展操作,大文件拷贝,图像裁剪,html处理,验证码、NoSql等常用封装。
官网教程:https://ldqk.org/55
github:https://github.com/ldqk/Masuit.Tools
|
1 |
|
DiffEngine
Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.
|
1 |
|
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard.
When using NuGet 3.x this package requires at least version 3.4.
|
1 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET 10.0
- System.CodeDom (>= 11.0.0-preview.2.26159.112)
.NET 11.0
- System.CodeDom (>= 11.0.0-preview.2.26159.112)
.NET Standard 2.0
- System.CodeDom (>= 11.0.0-preview.2.26159.112)