Version: 5
restore

Contents

Method

RunWmiStaticMethod

ModuleNativeServices
LibraryCore
Action

Run a WMI class method.

Parameters

Namespace (string): The WMI namespace to use, e.g. "root\ccm". From v3.1, this parameter is optional and defaults to "root\cimv2".

Class (string): The class, e.g. "SMS_Client".

Method (string): The name of the method to run.

Additional parameters for the specific method call. Their names are prefixed with "Param_".

Return values

The output, if any, from the method.

Example
 NativeServices.RunWmiStaticMethod(Namespace:"root\\cimv2", Class:"Win32_Process", Method:"Create", Param_Commandline:"notepad.exe");
Platforms
  • Windows
Notes

This is created in the Tachyon Agent's user context.