ITsSbResourcePluginStore::TestAndSetServerState method (sbtsv.h)

Conditionally sets a new state on a server.

Syntax

HRESULT TestAndSetServerState(
  [in]  BSTR         PoolName,
  [in]  BSTR         ServerFQDN,
  [in]  TARGET_STATE NewState,
  [in]  TARGET_STATE TestState,
  [out] TARGET_STATE *pInitState
);

Parameters

[in] PoolName

Name of the pool.

[in] ServerFQDN

Fully qualified domain name (FQDN) of the server.

[in] NewState

The state to set.

[in] TestState

If set to TARGET_UNKNOWN or the current state of the server, the server will be set as specified in the NewState parameter.

[out] pInitState

On return, points to the previous state of the server.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2016
Target Platform Windows
Header sbtsv.h

See also

ITsSbResourcePluginStore