The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IMsRdpWorkspace2::StartWorkspaceEx method

Associates user credentials and certificates with a connection ID. Beginning with Windows Server 2012, use this method instead of the StartWorkspace method on the IMsRdpWorkspace interface.


HRESULT StartWorkspaceEx(
  [in] BSTR bstrWorkspaceId,
  [in] BSTR bstrWorkspaceFriendlyName,
  [in] BSTR bstrRedirectorName,
  [in] BSTR bstrUserName,
  [in] BSTR bstrPassword,
  [in] BSTR bstrWorkspaceParams,
  [in] LONG lTimeout,
  [in] LONG lFlags


bstrWorkspaceId [in]

A string that contains a connection ID.

bstrWorkspaceFriendlyName [in]

A string that contains the name of the workspace that should be displayed to the end user.

bstrRedirectorName [in]

A string that contains a logical redirector for the workspace. If there is a single redirector, it should be specified here. For Windows Server 2012, specify the Remote Desktop Connection Broker server. For high availability deployments, specify the DNS RR name of the Remote Desktop Connection Brokers. In a Windows Server 2008 R2 deployment when there are multiple redirectors, this parameter can be NULL.

bstrUserName [in]

A string that contains a user name.

bstrPassword [in]

A string that contains a password.

bstrWorkspaceParams [in]

A string that contains one or more Secure Hash Algorithm 1 (SHA-1) hashes of signing certificates to associate with the specified connection ID. The hash values should be in hexadecimal string format and delimited by semicolons.

lTimeout [in]

The time period, in minutes, after which the credentials are deleted.

lFlags [in]

A flag that specifies properties of the user credentials. This can be a bitwise OR of the following values.


Delete credentials as soon as the last RemoteApp application is closed.


The password is encrypted.


The user credentials are verified. If this flag is not set, you must call the OnAuthenticated method before using the credentials.

Return value

If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following list.


The credential store already has an entry for the specified connection ID that contains credentials for a different user, and at least one active connection exists for this connection ID.


If single sign on (SSO) is disabled in RemoteApp and Desktop Connection, the credentials will not be stored.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012




IID_IMsRdpWorkspace is defined as 145D0621-04CF-4FC2-A766-A81A9069CDF8

See also