diff --git a/plugins/inputs/win_wmi/method.go b/plugins/inputs/win_wmi/method.go index a8cf33e97..463b20f4e 100644 --- a/plugins/inputs/win_wmi/method.go +++ b/plugins/inputs/win_wmi/method.go @@ -149,7 +149,7 @@ func (m *method) execute(acc telegraf.Accumulator) error { defer outputParamsRaw.Clear() // Execute the method - outputRaw, err := service.CallMethod("ExecMethod", "StdRegProv", m.Method, inputParamsRaw) + outputRaw, err := service.CallMethod("ExecMethod", m.ClassName, m.Method, inputParamsRaw) if err != nil { return fmt.Errorf("failed to execute method %s: %w", m.Method, err) }