Exchange Resource Manager::AddExchangeResources
This procedure adds public store and mail store resources to Exchange Resource Manager.
Arguments
Input argument | Required | Description |
---|---|---|
preferredDomainController |
No |
|
sendCredentials |
No |
True if credentials will be included in the xml request. |
publicStoresXMLString |
No |
Defines public store resources to add to the resource pool. Note that this property can be passed in as null if you aren't adding public stores. This property is passed in as an XML fragment string in the following format (one or more publicStore nodes should be included in the fragment):
|
mailStoresXmlString |
No |
Defines mail store resources to add to the resource pool. Note that this property can be passed in as null if you aren't adding mail stores. This property is passed in as an XML fragment string in the following format (one or more mailStore nodes should be included in the fragment):
|
Remarks
Method Syntax
public string AddExchangeResources(
string preferredDomainController,
string publicStoresXMLString,
string mailStoresXmlString,
bool sendCredentials)
Sample Code
Example XML Request
No example XML request.
Example XML Response
MPS XML response in string format; shown for format only, content may vary.
<response>
<data>
<preferredDomainController>AD01-wh.fabrikam.com</preferredDomainController>
<mailStores>
<mailStore>
<serverName>EXBE01-wh</serverName>
<shared>1</shared>
<megabytes>50000</megabytes>
<mailStoreName>BusinessMailstore2</mailStoreName>
</mailStore>
</mailStores>
</data>
</response>
Typical C# Usage
//Get user name and password.
string userName = this.Request.ServerVariables.Get("AUTH_USER");
string pass = this.Request.ServerVariables.Get("AUTH_PASSWORD");
//Set credentials.
ExchRM.PreAuthenticate = true;
ExchRM.Credentials = new NetworkCredential(userName,pass);
lblMsg.InnerHtml = mpsResponseHeaderLabel;
//Display response.
this.mpsResponse.DocumentSource = "";
response = ExchRM.AddExchangeResources(preferredDomainController, mailStoresXmlString, publicStoresXMLString, sendCredentials);
// set the response XML to match the return from MPF
responseXml.LoadXml(response);
this.mpsResponse.Document = responseXml;
lblDone.InnerText = successMsg;
Applies To
Web Services API for:
Hosted Messaging and Collaboration version 3.5
Hosted Messaging and Collaboration version 3.0
See also
Tasks
Exchange Resource Manager::RemoveExchangeResources
Exchange Resource Manager::ModifyExchangeResources