The ISmsClient::SetAssignedSite method, in Configuration Manager, sets the client's assigned site.

[IDL]
HRESULT SetAssignedSite(
	BSTR sSiteCode, 
	long uFlags
);

Parameters

sSiteCode


Data type: BSTRQualifiers: [in]Site code to which the client is being assigned.
uFlags


Data type: longQualifiers: [in, optional, defaultvalue(0)]Flags indicating optional site information. Possible values are listed below. The default value is SMS_CLIENT_NOVERIFY. Use SMS_CLIENT_VERIFYSITECODE if the specified site code must be verified against its default management point.

0

SMS_CLIENT_NOVERIFY

0x1

SMS_CLIENT_VERIFYSITECODE

0x2

SMS_CLIENT_VERIFYMANAGEMENTPOINT

Return Value

An HRESULT code. Possible values include, but are not limited to, the following:

S_OK


The method succeeded.
SMSCLIENT_E_INVALIDSITECODE


The site code was invalid.
WBEM_E_xxxx


An error occurred updating Windows Management Instrumentation (WMI).

Remarks

Local administrator privileges are required to call this method.

Requirements

smsclient.dll

Runtime Requirements

Development Requirements

See Also


Send comments about this topic to Microsoft.