CimSession.CreateInstanceAsync Method (String, CimInstance, CimOperationOptions)
Creates asynchronously an instance on the server that the session represents.
Namespace: Microsoft.Management.Infrastructure
Assembly: Microsoft.Management.Infrastructure (in Microsoft.Management.Infrastructure.dll)
Syntax
public CimAsyncResult<CimInstance> CreateInstanceAsync(
string namespaceName,
CimInstance instance,
CimOperationOptions options
)
public:
CimAsyncResult<CimInstance^>^ CreateInstanceAsync(
String^ namespaceName,
CimInstance^ instance,
CimOperationOptions^ options
)
member CreateInstanceAsync :
namespaceName:string *
instance:CimInstance *
options:CimOperationOptions -> CimAsyncResult<CimInstance>
Public Function CreateInstanceAsync (
namespaceName As String,
instance As CimInstance,
options As CimOperationOptions
) As CimAsyncResult(Of CimInstance)
Parameters
namespaceName
Type: System.StringA string that contains the optional namespace name to carry out the operation. If none is specified, the server will pick a default. The namespace cannot include a computer name. It can only be in the form of a namespace name separated by a slash mark character (/). For example, the following would be a valid namespaceName value: root/cimv2.
instance
Type: Microsoft.Management.Infrastructure.CimInstanceA CimInstance object that represents the class name and keys of the instance to be created on the server along with the rest of the properties of the instance that the destination instance will be set to. Sometimes keys are read-only, so not all keys need to be specified. If the instance that is specified already exists, the function will fail; to update an existing instance, use the ModifyInstance method.
options
Type: Microsoft.Management.Infrastructure.Options.CimOperationOptionsA CimOperationOptions object that specifies options, such as timeouts, and how to control the CIM semantics.
Return Value
Type: Microsoft.Management.Infrastructure.Generic.CimAsyncResult<CimInstance>
An object that represents the status of the CimSession object creation.
See Also
CreateInstanceAsync Overload
CimSession Class
Microsoft.Management.Infrastructure Namespace
Return to top