Share via


NewCimSessionCommand Class

 

This cmdlet enables the IT professional to create a CIM Session. A CimSession object is a client-side representation of the connection between the client and the server. The CimSession object returned by the cmdlet is used by all other CIM cmdlets.

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

Inheritance Hierarchy

System.Object
  System.Management.Automation.Internal.InternalCommand
    System.Management.Automation.Cmdlet
      Microsoft.Management.Infrastructure.CimCmdlets.CimBaseCommand
        Microsoft.Management.Infrastructure.CimCmdlets.NewCimSessionCommand

Syntax

[CmdletAttribute("New", "CimSession", DefaultParameterSetName = "CredentialParameterSet", 
    HelpUri = "https://go.microsoft.com/fwlink/?LinkId=227967")]
[OutputTypeAttribute(new Type[] { ... })]
public sealed class NewCimSessionCommand : CimBaseCommand
[CmdletAttribute("New", "CimSession", DefaultParameterSetName = "CredentialParameterSet", 
    HelpUri = "https://go.microsoft.com/fwlink/?LinkId=227967")]
[OutputTypeAttribute(new array<Type^>^ { ... })]
public ref class NewCimSessionCommand sealed : CimBaseCommand
[<Sealed>]
[<CmdletAttribute("New", "CimSession", DefaultParameterSetName = "CredentialParameterSet",
    HelpUri = "https://go.microsoft.com/fwlink/?LinkId=227967")>]
[<OutputTypeAttribute([| ... |])>]
type NewCimSessionCommand = 
    class
        inherit CimBaseCommand
    end
<CmdletAttribute("New", "CimSession", DefaultParameterSetName := "CredentialParameterSet",
    HelpUri := "https://go.microsoft.com/fwlink/?LinkId=227967")>
<OutputTypeAttribute(New Type() { ... })>
Public NotInheritable Class NewCimSessionCommand
    Inherits CimBaseCommand

Constructors

Name Description
System_CAPS_pubmethod NewCimSessionCommand()

Constructs an object that enables the user to create a CIM Session. A CIM session object is a client-side representation of the connection between the client and the server.

Properties

Name Description
System_CAPS_pubproperty Authentication

Gets and sets the Authentication parameter. The PasswordAuthenticationMechanism enumeration specifies the allowed authentication types.

System_CAPS_pubproperty CertificateThumbprint

Gets and sets the CertificateThumbprint parameter, for use with the WS-Management protocol.

System_CAPS_pubproperty CommandOrigin

(Inherited from InternalCommand.)

System_CAPS_pubproperty CommandRuntime

(Inherited from Cmdlet.)

System_CAPS_pubproperty ComputerName

Gets and sets the ComputerName parameter, which specifies the computer on which the commands associated with this session will run. The default is the local host.

System_CAPS_pubproperty Credential

Gets and sets the Credential parameter, which specifies a user account that has permission to perform this action. The default is the current user.

System_CAPS_pubproperty CurrentPSTransaction

(Inherited from Cmdlet.)

System_CAPS_pubproperty Name

Gets and sets the Name parameter, which specifies a friendly name for the CIM session connection. If you don't specify a name, the sessions are given by default the sequential names CimSession1, CimSession2, CimSession3, etc.

System_CAPS_pubproperty OperationTimeoutSec

Sets and gets the OperationTimeoutSec parameter, which specifies the operation timeout in seconds for all operations in the session. Individual operations can override this timeout.

System_CAPS_pubproperty Port

Gets and sets the Port parameter, which specifies the port number to use if different than the default port number. This is specifically for the WSMan protocol.

System_CAPS_pubproperty SessionOption

Sets and gets the SessionOption parameter, which specifies the session options object that is passed to the cmdlet as an argument. If the argument is not given, a default object will be created for the session in the .NET API layer. If a DCOMSessionOption object is passed, then a connection is made using DCOM. If a WsManSessionOption object is passed, then the connection is made using WSMan.

System_CAPS_pubproperty SkipTestConnection

Gets and sets the switch parameter SkipTestConnection, which specifies whether to skip the test connection.

System_CAPS_pubproperty Stopping

(Inherited from Cmdlet.)

Methods

Name Description
System_CAPS_pubmethod Dispose()

Releases resources.(Inherited from CimBaseCommand.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetResourceString(String, String)

(Inherited from Cmdlet.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod Invoke()

(Inherited from Cmdlet.)

System_CAPS_pubmethod ShouldContinue(String, String)

(Inherited from Cmdlet.)

System_CAPS_pubmethod ShouldContinue(String, String, Boolean, Boolean, Boolean)

(Inherited from Cmdlet.)

System_CAPS_pubmethod ShouldContinue(String, String, Boolean, Boolean)

(Inherited from Cmdlet.)

System_CAPS_pubmethod ShouldProcess(String)

(Inherited from Cmdlet.)

System_CAPS_pubmethod ShouldProcess(String, String)

(Inherited from Cmdlet.)

System_CAPS_pubmethod ShouldProcess(String, String, String)

(Inherited from Cmdlet.)

System_CAPS_pubmethod ShouldProcess(String, String, String, ShouldProcessReason)

(Inherited from Cmdlet.)

System_CAPS_pubmethod ThrowTerminatingError(ErrorRecord)

(Inherited from Cmdlet.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod TransactionAvailable()

(Inherited from Cmdlet.)

System_CAPS_pubmethod WriteCommandDetail(String)

(Inherited from Cmdlet.)

System_CAPS_pubmethod WriteDebug(String)

(Inherited from Cmdlet.)

System_CAPS_pubmethod WriteError(ErrorRecord)

(Inherited from Cmdlet.)

System_CAPS_pubmethod WriteInformation(InformationRecord)

(Inherited from Cmdlet.)

System_CAPS_pubmethod WriteInformation(Object, String[])

(Inherited from Cmdlet.)

System_CAPS_pubmethod WriteObject(Object)

(Inherited from Cmdlet.)

System_CAPS_pubmethod WriteObject(Object, Boolean)

(Inherited from Cmdlet.)

System_CAPS_pubmethod WriteProgress(ProgressRecord)

(Inherited from Cmdlet.)

System_CAPS_pubmethod WriteVerbose(String)

(Inherited from Cmdlet.)

System_CAPS_pubmethod WriteWarning(String)

(Inherited from Cmdlet.)

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.CimCmdlets Namespace

Return to top