IWSManConnectionOptions interface

The IWSManConnectionOptions object is passed to the IWSMan::CreateSession method to provide the user name and password associated with the local account on the remote computer. If no parameters are supplied, then the credentials of the account running the script are the default values.

When to use

Use an IWSManConnectionOptions object for Basic authentication or anytime you change credentials from the logged-on user credentials. For more information, see Authentication for Remote Connections.

The WSManFlagCredUserNamePassword flag should be set on the IWSMan.CreateSession call when using the UserName and Password for authentication. This flag is defined in the _WSManSessionFlags enumeration. For more information, see Session Constants.

Members

The IWSManConnectionOptions interface inherits from the IUnknown interface. IWSManConnectionOptions also has these types of members:

Properties

The IWSManConnectionOptions interface has these properties.

PropertyAccess typeDescription

Password Property of IWSManConnectionOptions

Read-only

Sets the password of a local or a domain account on the remote computer.

UserName Property of IWSManConnectionOptions

Read/write

Sets and gets the user name of a local or a domain account on the remote computer. This property determines the user name for authentication.

 

Remarks

If a Windows Remote Management client application is running under impersonation, then a failure occurs if you set the Password property. A client application is a script or other program that sends a request to WinRM on the local or a remote computer. The client application may be running under impersonation because it called a function like ImpersonateClient. An Active Server Page (ASP) or service cannot request a user name and password if the ASP process runs under an account that impersonates a client.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

WSManDisp.h

IDL

WSManDisp.idl

Library

WSManDisp.tlb

DLL

WSMAuto.dll

See also

Windows Remote Management Reference
ConnectionOptions

 

 

Show: