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 | |
|---|---|---|
| .jpeg) | ComputerName | Gets the computer name used to create the current session. | 
| .jpeg) | InstanceId | Gets the unique instance ID of the current session object. | 
Methods
| Name | Description | |
|---|---|---|
| .jpeg) | Close() | Closes a session and releases all associated memory. | 
| .jpeg) | CloseAsync() | Closes a session asynchronously and releases all associated memory. | 
| .jpeg) .jpeg) | Create(String) | Initializes a new instance of the CimSession class. | 
| .jpeg) .jpeg) | Create(String, CimSessionOptions) | Initializes a new instance of the CimSession class. | 
| .jpeg) .jpeg) | CreateAsync(String) | Asynchronously initializes a new instance of the CimSession class. | 
| .jpeg) .jpeg) | CreateAsync(String, CimSessionOptions) | Asynchronously initializes a new instance of the CimSession class. | 
| .jpeg) | CreateInstance(String, CimInstance) | Creates an instance on the server that the session represents. | 
| .jpeg) | CreateInstance(String, CimInstance, CimOperationOptions) | Creates an instance on the server that the session represents. | 
| .jpeg) | CreateInstanceAsync(String, CimInstance) | Creates asynchronously an instance on the server that the session represents. | 
| .jpeg) | CreateInstanceAsync(String, CimInstance, CimOperationOptions) | Creates asynchronously an instance on the server that the session represents. | 
| .jpeg) | DeleteInstance(CimInstance) | Deletes an instance on the server represented by the session. | 
| .jpeg) | DeleteInstance(String, CimInstance) | Deletes an instance on the server represented by the session. | 
| .jpeg) | DeleteInstance(String, CimInstance, CimOperationOptions) | Deletes an instance on the server represented by the session. | 
| .jpeg) | DeleteInstanceAsync(CimInstance) | Asynchronously deletes an instance on the server represented by the session. | 
| .jpeg) | DeleteInstanceAsync(String, CimInstance) | Asynchronously deletes an instance on the server represented by the session. | 
| .jpeg) | DeleteInstanceAsync(String, CimInstance, CimOperationOptions) | Asynchronously deletes an instance on the server represented by the session. | 
| .jpeg) | Dispose() | Releases resources associated with this object. | 
| .jpeg) | Dispose(Boolean) | Releases resources associated with this object. | 
| .jpeg) | EnumerateAssociatedInstances(String, CimInstance, String, String, String, String) | Finds instances that are associated with the specific key instance. | 
| .jpeg) | EnumerateAssociatedInstances(String, CimInstance, String, String, String, String, CimOperationOptions) | Finds instances that are associated with the specific key instance. | 
| .jpeg) | EnumerateAssociatedInstancesAsync(String, CimInstance, String, String, String, String) | Asynchronously finds instances that are associated with the specific key instance. | 
| .jpeg) | 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. | 
| .jpeg) | EnumerateClasses(String) | Enumerates the classes of a specified session. | 
| .jpeg) | EnumerateClasses(String, String) | Enumerates the classes of a specified session. | 
| .jpeg) | EnumerateClasses(String, String, CimOperationOptions) | Enumerates the classes of a specified session. | 
| .jpeg) | EnumerateClassesAsync(String) | Asynchronous method that enumerates the classes of a specified session. | 
| .jpeg) | EnumerateClassesAsync(String, String) | Asynchronous method that enumerates the classes of a specified session. | 
| .jpeg) | EnumerateClassesAsync(String, String, CimOperationOptions) | Asynchronous method that enumerates the classes of a specified session. | 
| .jpeg) | EnumerateInstances(String, String) | Enumerate all instances on the server represented by the session that are associated with a class. | 
| .jpeg) | EnumerateInstances(String, String, CimOperationOptions) | Enumerates synchronously all instances on the server represented by the session that are associated with a class. | 
| .jpeg) | EnumerateInstancesAsync(String, String) | Enumerate all instances on the server represented by the session that are associated with a class. | 
| .jpeg) | EnumerateInstancesAsync(String, String, CimOperationOptions) | Enumerate all instances on the server represented by the session that are associated with a class. | 
| .jpeg) | EnumerateReferencingInstances(String, CimInstance, String, String) | Finds the association object that references the specified key instance. | 
| .jpeg) | EnumerateReferencingInstances(String, CimInstance, String, String, CimOperationOptions) | Finds the association object that references the specified key instance. | 
| .jpeg) | EnumerateReferencingInstancesAsync(String, CimInstance, String, String) | Asynchronous method that finds the association object that references the specified key instance. | 
| .jpeg) | EnumerateReferencingInstancesAsync(String, CimInstance, String, String, CimOperationOptions) | Asynchronous method that finds the association object that references the specified key instance. | 
| .jpeg) | Equals(Object) | (Inherited from Object.) | 
| .jpeg) | Finalize() | (Inherited from Object.) | 
| .jpeg) | GetClass(String, String) | Gets a CimClass object based on a specific class name. | 
| .jpeg) | GetClass(String, String, CimOperationOptions) | Gets a CimClass object based on a specific class name. | 
| .jpeg) | GetClassAsync(String, String) | Asynchronous method that gets a CimClass object based on a specific class name. | 
| .jpeg) | GetClassAsync(String, String, CimOperationOptions) | Asynchronous method that gets a CimClass object based on a specific class name. | 
| .jpeg) | GetHashCode() | (Inherited from Object.) | 
| .jpeg) | GetInstance(String, CimInstance) | Gets the specified instance from the server represented by the session. | 
| .jpeg) | GetInstance(String, CimInstance, CimOperationOptions) | Gets the specified instance from the server represented by the session. | 
| .jpeg) | GetInstanceAsync(String, CimInstance) | Asynchronous method that gets the specified instance from the server represented by the session. | 
| .jpeg) | GetInstanceAsync(String, CimInstance, CimOperationOptions) | Asynchronous method that gets the specified instance from the server represented by the session. | 
| .jpeg) | GetType() | (Inherited from Object.) | 
| .jpeg) | InvokeMethod(CimInstance, String, CimMethodParametersCollection) | Invokes an instance method. | 
| .jpeg) | InvokeMethod(String, CimInstance, String, CimMethodParametersCollection) | Invokes an instance method. | 
| .jpeg) | InvokeMethod(String, CimInstance, String, CimMethodParametersCollection, CimOperationOptions) | Invokes an instance method. | 
| .jpeg) | InvokeMethod(String, String, String, CimMethodParametersCollection) | Invokes an instance method. | 
| .jpeg) | InvokeMethod(String, String, String, CimMethodParametersCollection, CimOperationOptions) | Invokes an instance method. | 
| .jpeg) | InvokeMethodAsync(CimInstance, String, CimMethodParametersCollection) | Invokes an instance method asynchronously. | 
| .jpeg) | InvokeMethodAsync(String, CimInstance, String, CimMethodParametersCollection) | Invokes an instance method asynchronously. | 
| .jpeg) | InvokeMethodAsync(String, CimInstance, String, CimMethodParametersCollection, CimOperationOptions) | Invokes an instance method asynchronously. | 
| .jpeg) | InvokeMethodAsync(String, String, String, CimMethodParametersCollection) | Invokes a static method asynchronously. | 
| .jpeg) | InvokeMethodAsync(String, String, String, CimMethodParametersCollection, CimOperationOptions) | Invokes a static method asynchronously. | 
| .jpeg) | MemberwiseClone() | (Inherited from Object.) | 
| .jpeg) | ModifyInstance(CimInstance) | Updates an existing instance in the server represented by the session. | 
| .jpeg) | ModifyInstance(String, CimInstance) | Updates an existing instance in the server represented by the session. | 
| .jpeg) | ModifyInstance(String, CimInstance, CimOperationOptions) | Updates an existing instance in the server represented by the session. | 
| .jpeg) | ModifyInstanceAsync(CimInstance) | Asynchronous method that updates an existing instance in the server represented by the session. | 
| .jpeg) | ModifyInstanceAsync(String, CimInstance) | Asynchronous method that updates an existing instance in the server represented by the session. | 
| .jpeg) | ModifyInstanceAsync(String, CimInstance, CimOperationOptions) | Asynchronous method that updates an existing instance in the server represented by the session. | 
| .jpeg) | QueryInstances(String, String, String) | Queries for a set of instances based on a query expression. | 
| .jpeg) | QueryInstances(String, String, String, CimOperationOptions) | Queries for a set of instances based on a query expression. | 
| .jpeg) | QueryInstancesAsync(String, String, String) | Queries asynchronously for a set of instances based on a query expression. | 
| .jpeg) | QueryInstancesAsync(String, String, String, CimOperationOptions) | Queries asynchronously for a set of instances based on a query expression. | 
| .jpeg) | Subscribe(String, String, String) | Subscribes to an indication on the server represented by the session. | 
| .jpeg) | Subscribe(String, String, String, CimOperationOptions) | Subscribes to an indication on the server represented by the session. | 
| .jpeg) | Subscribe(String, String, String, CimOperationOptions, CimSubscriptionDeliveryOptions) | Subscribes to an indication on the server represented by the session. | 
| .jpeg) | Subscribe(String, String, String, CimSubscriptionDeliveryOptions) | Subscribes to an indication on the server represented by the session. | 
| .jpeg) | SubscribeAsync(String, String, String) | Asynchronous method that subscribes to an indication on the server represented by the session. | 
| .jpeg) | SubscribeAsync(String, String, String, CimOperationOptions) | Asynchronous method that subscribes to an indication on the server represented by the session. | 
| .jpeg) | SubscribeAsync(String, String, String, CimOperationOptions, CimSubscriptionDeliveryOptions) | Asynchronous method that subscribes to an indication on the server represented by the session. | 
| .jpeg) | SubscribeAsync(String, String, String, CimSubscriptionDeliveryOptions) | Asynchronous method that subscribes to an indication on the server represented by the session. | 
| .jpeg) | TestConnection() | Tests a connection by communicating with the server represented by the session to determine whether it is responding. | 
| .jpeg) | TestConnection(CimInstance, CimException) | Tests a connection by communicating with the server represented by the session to determine whether it is responding. | 
| .jpeg) | TestConnectionAsync() | Tests a connection by communicating with the server represented by the session to determine whether it is responding. | 
| .jpeg) | 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