You could use WMI library subject to security considerations, but this is unsupported, assembly and dependencies must be UNSAFE, and your code may stop working in future releases. Search this forum for "WMI" to see some of the things folks have
run into.