Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
wmi
✓ github.com/StackExchange/wmi
Query WMI for operating system information
package main
import (
"fmt"
"github.com/StackExchange/wmi"
)
type Win32_OperatingSystem struct {
Caption string
}
func main() {
var dst []Win32_OperatingSystem
q := wmi.CreateQuery(&dst, "")
err := wmi.Query(q, &dst)
if err != nil {
panic(err)
}
for _, os := range dst {
fmt.Println(os.Caption)
}
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.2.1latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.