Condividi tramite


CimSession Class

 

Represents a client-side connection to a CIM server.

Namespace:   Microsoft.Management.Infrastructure
Assembly:  Microsoft.Management.Infrastructure (in Microsoft.Management.Infrastructure.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Management.Infrastructure.CimSession

Syntax

public class CimSession : IDisposable
public ref class CimSession : IDisposable
type CimSession = 
    class
        interface IDisposable
    end
Public Class CimSession
    Implements IDisposable

Properties

Name Description
System_CAPS_pubproperty ComputerName

Gets the computer name used to create the current session.

System_CAPS_pubproperty InstanceId

Gets the unique instance ID of the current session object.

Methods

Name Description
System_CAPS_pubmethod Close()

Closes a session and releases all associated memory.

System_CAPS_pubmethod CloseAsync()

Closes a session asynchronously and releases all associated memory.

System_CAPS_pubmethodSystem_CAPS_static Create(String)

Initializes a new instance of the CimSession class.

System_CAPS_pubmethodSystem_CAPS_static Create(String, CimSessionOptions)

Initializes a new instance of the CimSession class.

System_CAPS_pubmethodSystem_CAPS_static CreateAsync(String)

Asynchronously initializes a new instance of the CimSession class.

System_CAPS_pubmethodSystem_CAPS_static CreateAsync(String, CimSessionOptions)

Asynchronously initializes a new instance of the CimSession class.

System_CAPS_pubmethod CreateInstance(String, CimInstance)

Creates an instance on the server that the session represents.

System_CAPS_pubmethod CreateInstance(String, CimInstance, CimOperationOptions)

Creates an instance on the server that the session represents.

System_CAPS_pubmethod CreateInstanceAsync(String, CimInstance)

Creates asynchronously an instance on the server that the session represents.

System_CAPS_pubmethod CreateInstanceAsync(String, CimInstance, CimOperationOptions)

Creates asynchronously an instance on the server that the session represents.

System_CAPS_pubmethod DeleteInstance(CimInstance)

Deletes an instance on the server represented by the session.

System_CAPS_pubmethod DeleteInstance(String, CimInstance)

Deletes an instance on the server represented by the session.

System_CAPS_pubmethod DeleteInstance(String, CimInstance, CimOperationOptions)

Deletes an instance on the server represented by the session.

System_CAPS_pubmethod DeleteInstanceAsync(CimInstance)

Asynchronously deletes an instance on the server represented by the session.

System_CAPS_pubmethod DeleteInstanceAsync(String, CimInstance)

Asynchronously deletes an instance on the server represented by the session.

System_CAPS_pubmethod DeleteInstanceAsync(String, CimInstance, CimOperationOptions)

Asynchronously deletes an instance on the server represented by the session.

System_CAPS_pubmethod Dispose()

Releases resources associated with this object.

System_CAPS_protmethod Dispose(Boolean)

Releases resources associated with this object.

System_CAPS_pubmethod EnumerateAssociatedInstances(String, CimInstance, String, String, String, String)

Finds instances that are associated with the specific key instance.

System_CAPS_pubmethod EnumerateAssociatedInstances(String, CimInstance, String, String, String, String, CimOperationOptions)

Finds instances that are associated with the specific key instance.

System_CAPS_pubmethod EnumerateAssociatedInstancesAsync(String, CimInstance, String, String, String, String)

Asynchronously finds instances that are associated with the specific key instance.

System_CAPS_pubmethod EnumerateAssociatedInstancesAsync(String, CimInstance, String, String, String, String, CimOperationOptions)

Asynchronously finds instances that are associated with the specific key instance that is using the specified operation options.

System_CAPS_pubmethod EnumerateClasses(String)

Enumerates the classes of a specified session.

System_CAPS_pubmethod EnumerateClasses(String, String)

Enumerates the classes of a specified session.

System_CAPS_pubmethod EnumerateClasses(String, String, CimOperationOptions)

Enumerates the classes of a specified session.

System_CAPS_pubmethod EnumerateClassesAsync(String)

Asynchronous method that enumerates the classes of a specified session.

System_CAPS_pubmethod EnumerateClassesAsync(String, String)

Asynchronous method that enumerates the classes of a specified session.

System_CAPS_pubmethod EnumerateClassesAsync(String, String, CimOperationOptions)

Asynchronous method that enumerates the classes of a specified session.

System_CAPS_pubmethod EnumerateInstances(String, String)

Enumerate all instances on the server represented by the session that are associated with a class.

System_CAPS_pubmethod EnumerateInstances(String, String, CimOperationOptions)

Enumerates synchronously all instances on the server represented by the session that are associated with a class.

System_CAPS_pubmethod EnumerateInstancesAsync(String, String)

Enumerate all instances on the server represented by the session that are associated with a class.

System_CAPS_pubmethod EnumerateInstancesAsync(String, String, CimOperationOptions)

Enumerate all instances on the server represented by the session that are associated with a class.

System_CAPS_pubmethod EnumerateReferencingInstances(String, CimInstance, String, String)

Finds the association object that references the specified key instance.

System_CAPS_pubmethod EnumerateReferencingInstances(String, CimInstance, String, String, CimOperationOptions)

Finds the association object that references the specified key instance.

System_CAPS_pubmethod EnumerateReferencingInstancesAsync(String, CimInstance, String, String)

Asynchronous method that finds the association object that references the specified key instance.

System_CAPS_pubmethod EnumerateReferencingInstancesAsync(String, CimInstance, String, String, CimOperationOptions)

Asynchronous method that finds the association object that references the specified key instance.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetClass(String, String)

Gets a CimClass object based on a specific class name.

System_CAPS_pubmethod GetClass(String, String, CimOperationOptions)

Gets a CimClass object based on a specific class name.

System_CAPS_pubmethod GetClassAsync(String, String)

Asynchronous method that gets a CimClass object based on a specific class name.

System_CAPS_pubmethod GetClassAsync(String, String, CimOperationOptions)

Asynchronous method that gets a CimClass object based on a specific class name.

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetInstance(String, CimInstance)

Gets the specified instance from the server represented by the session.

System_CAPS_pubmethod GetInstance(String, CimInstance, CimOperationOptions)

Gets the specified instance from the server represented by the session.

System_CAPS_pubmethod GetInstanceAsync(String, CimInstance)

Asynchronous method that gets the specified instance from the server represented by the session.

System_CAPS_pubmethod GetInstanceAsync(String, CimInstance, CimOperationOptions)

Asynchronous method that gets the specified instance from the server represented by the session.

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod InvokeMethod(CimInstance, String, CimMethodParametersCollection)

Invokes an instance method.

System_CAPS_pubmethod InvokeMethod(String, CimInstance, String, CimMethodParametersCollection)

Invokes an instance method.

System_CAPS_pubmethod InvokeMethod(String, CimInstance, String, CimMethodParametersCollection, CimOperationOptions)

Invokes an instance method.

System_CAPS_pubmethod InvokeMethod(String, String, String, CimMethodParametersCollection)

Invokes an instance method.

System_CAPS_pubmethod InvokeMethod(String, String, String, CimMethodParametersCollection, CimOperationOptions)

Invokes an instance method.

System_CAPS_pubmethod InvokeMethodAsync(CimInstance, String, CimMethodParametersCollection)

Invokes an instance method asynchronously.

System_CAPS_pubmethod InvokeMethodAsync(String, CimInstance, String, CimMethodParametersCollection)

Invokes an instance method asynchronously.

System_CAPS_pubmethod InvokeMethodAsync(String, CimInstance, String, CimMethodParametersCollection, CimOperationOptions)

Invokes an instance method asynchronously.

System_CAPS_pubmethod InvokeMethodAsync(String, String, String, CimMethodParametersCollection)

Invokes a static method asynchronously.

System_CAPS_pubmethod InvokeMethodAsync(String, String, String, CimMethodParametersCollection, CimOperationOptions)

Invokes a static method asynchronously.

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ModifyInstance(CimInstance)

Updates an existing instance in the server represented by the session.

System_CAPS_pubmethod ModifyInstance(String, CimInstance)

Updates an existing instance in the server represented by the session.

System_CAPS_pubmethod ModifyInstance(String, CimInstance, CimOperationOptions)

Updates an existing instance in the server represented by the session.

System_CAPS_pubmethod ModifyInstanceAsync(CimInstance)

Asynchronous method that updates an existing instance in the server represented by the session.

System_CAPS_pubmethod ModifyInstanceAsync(String, CimInstance)

Asynchronous method that updates an existing instance in the server represented by the session.

System_CAPS_pubmethod ModifyInstanceAsync(String, CimInstance, CimOperationOptions)

Asynchronous method that updates an existing instance in the server represented by the session.

System_CAPS_pubmethod QueryInstances(String, String, String)

Queries for a set of instances based on a query expression.

System_CAPS_pubmethod QueryInstances(String, String, String, CimOperationOptions)

Queries for a set of instances based on a query expression.

System_CAPS_pubmethod QueryInstancesAsync(String, String, String)

Queries asynchronously for a set of instances based on a query expression.

System_CAPS_pubmethod QueryInstancesAsync(String, String, String, CimOperationOptions)

Queries asynchronously for a set of instances based on a query expression.

System_CAPS_pubmethod Subscribe(String, String, String)

Subscribes to an indication on the server represented by the session.

System_CAPS_pubmethod Subscribe(String, String, String, CimOperationOptions)

Subscribes to an indication on the server represented by the session.

System_CAPS_pubmethod Subscribe(String, String, String, CimOperationOptions, CimSubscriptionDeliveryOptions)

Subscribes to an indication on the server represented by the session.

System_CAPS_pubmethod Subscribe(String, String, String, CimSubscriptionDeliveryOptions)

Subscribes to an indication on the server represented by the session.

System_CAPS_pubmethod SubscribeAsync(String, String, String)

Asynchronous method that subscribes to an indication on the server represented by the session.

System_CAPS_pubmethod SubscribeAsync(String, String, String, CimOperationOptions)

Asynchronous method that subscribes to an indication on the server represented by the session.

System_CAPS_pubmethod SubscribeAsync(String, String, String, CimOperationOptions, CimSubscriptionDeliveryOptions)

Asynchronous method that subscribes to an indication on the server represented by the session.

System_CAPS_pubmethod SubscribeAsync(String, String, String, CimSubscriptionDeliveryOptions)

Asynchronous method that subscribes to an indication on the server represented by the session.

System_CAPS_pubmethod TestConnection()

Tests a connection by communicating with the server represented by the session to determine whether it is responding.

System_CAPS_pubmethod TestConnection(CimInstance, CimException)

Tests a connection by communicating with the server represented by the session to determine whether it is responding.

System_CAPS_pubmethod TestConnectionAsync()

Tests a connection by communicating with the server represented by the session to determine whether it is responding.

System_CAPS_pubmethod ToString()

Gets a string that contains the session and computer name.(Overrides Object.ToString().)

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Management.Infrastructure Namespace

Return to top