Home

InvokeCimMethod

InvokeCimMethod is a PowerShell command that calls a method defined on a CIM (Common Information Model) class or on a specific CIM instance. It is part of the CimCmdlets module and is designed to work with CIM/WMI-compatible providers over WS-Management, enabling management tasks on local or remote systems. The cmdlet serves as a modern alternative to legacy WMI method invocation.

Targeting can be done against a CIM class method or an instance method. To invoke a class

Return values and behavior vary by provider, but the cmdlet generally returns a CIM method result. This

Example usage commonly involves invoking a method on a system class, such as starting a process via

See also: Get-CimInstance, New-CimInstance, Set-CimInstance, and New-CimSession.

method,
you
specify
the
class
name
and
method
name,
along
with
the
namespace
and
any
required
arguments.
To
invoke
an
instance
method,
you
provide
a
CIM
instance
as
the
target
(via
-InputObject
or
a
CimInstance)
in
addition
to
the
method
name
and
arguments.
Common
parameters
include
-ClassName,
-MethodName,
-Namespace,
-Arguments,
-CimSession,
and
-ComputerName.
The
-Arguments
parameter
accepts
a
hashtable
that
maps
the
method's
parameter
names
to
values.
may
include
a
return
value
from
the
method
and
any
output
produced
by
the
provider.
Some
CIM
methods
may
execute
synchronously,
while
others
can
be
invoked
asynchronously
depending
on
the
session
configuration
and
provider
support.
the
Win32_Process
class
Create
method
or
performing
a
provider-defined
action
on
a
remote
host
by
establishing
a
CimSession
and
calling
InvokeCimMethod
with
appropriate
arguments.
Users
should
ensure
proper
credentials
and
permissions,
as
remote
invocation
depends
on
CIM/WS-Management
configuration
and
security
settings.