System.Management 9.0.0-rc.2.24473.5
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.ManagementClass
System.Management.ManagementObject
System.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 |
---|---|
DiffEngine
Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.
|
60 |
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.
|
53 |
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.
|
61 |
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.
|
75 |
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.
|
83 |
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.
|
85 |
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.
|
62 |
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.
|
75 |
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.
10dc31ea70c14a33f371cea5a757a3d95b218acf
When using NuGet 3.x this package requires at least version 3.4.
|
63 |
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.
8f968b9e79c5721d78cc88e46fe57457fe9d490d
When using NuGet 3.x this package requires at least version 3.4.
|
74 |
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.
|
53 |
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.
|
63 |
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.
|
64 |
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.
|
66 |
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.
|
70 |
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.
|
75 |
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.
|
76 |
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.
|
79 |
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.
|
85 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET 8.0
- System.CodeDom (>= 9.0.0-rc.2.24473.5)
.NET 9.0
- System.CodeDom (>= 9.0.0-rc.2.24473.5)
.NET Standard 2.0
- System.CodeDom (>= 9.0.0-rc.2.24473.5)