Share via


Exchange Resource Manager Ex::RemoveExchangeResources

This procedure removes public store and mail store resources from Exchange Resource Manager. This call is restricted to Domain Admins.

Arguments

Input argument Required Description

preferredDomainController

No

sendCredentials

No

True if including credentials in the XML request.

publicStoresXMLString

No

Defines public store resources to remove from the resource pool. Note that this property can be passed in as null if you aren't removing 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):

<publicStores> 
        <publicStore> 
        <serverName>RAVEN1</serverName> 
        <megabytes>10000</megabytes> 
         </publicStore> 
</publicStores> 
                        

mailStoresXmlString

No

Defines mail store resources to remove from the resource pool. Note that this property can be passed in as null if you aren't removing 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):

<mailStores> 
        <mailStore> 
        <serverName>RAVEN1</serverName> 
        <mailStoreName>Mailbox Store (RAVEN1)</mailStoreName> 
        <megabytes>8000</megabytes> 
        <shared>1</shared> 
        </mailStore> 
        <mailStore> 
        <serverName>RAVEN1</serverName> 
        <mailStoreName>Mailbox Store 2 (RAVEN1)</mailStoreName> 
        <megabytes>8000</megabytes> 
        <shared>0</shared> 
        </mailStore> 
        <mailStore> 
        <serverName>RAVEN1</serverName> 
        <mailStoreName>Mailbox Store 3 (RAVEN1)</mailStoreName> 
        <megabytes>8000</megabytes> 
        <shared>0</shared> 
        </mailStore> 
</mailStores> 
                        

frontEndServersXmlString

No

One or more elements including the <serverName> element which holds the name of the Exchange Server.

consumerMailStoresXmlString

No

Defines consumer mailstore resources to remove the resource pool. Note that this property can be passed in as null if you aren't removing consumer 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):

<consumerMailStores> 
        <mailStore> 
        <serverName>EXBE01-WH</serverName> 
        <mailStoreName>ConsumerMailstore3</mailStoreName> 
        <megabytes>50000</megabytes> 
        <warningPc>90</warningPc> 
        <defaultMaxFillPc>90</defaultMaxFillPc> 
        </mailStore> 
</consumerMailStores>  
                        

Remarks

Method Syntax

public string RemoveExchangeResources( 
string preferredDomainController, 
string publicStoresXMLString,  
string mailStoresXmlString, 
string frontEndServersXmlString, 
string consumerMailStoresXmlString, 
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> 
        <mailStoreName>BusinessMailstore5</mailStoreName> 
        <megabytes>50000</megabytes> 
        <shared>1</shared> 
      </mailStore> 
        </mailStores> 
    <frontEndServers> 
      <frontEndServer> 
        <serverName>EXFE01-WH</serverName> 
      </frontEndServer> 
    </frontEndServers> 
    <consumerMailStores> 
      <mailStore> 
        <serverName>EXBE01-WH</serverName> 
        <mailStoreName>ConsumerMailstore3</mailStoreName> 
        <megabytes>50000</megabytes> 
        <warningPc>90</warningPc> 
        <defaultMaxFillPc>90</defaultMaxFillPc> 
      </mailStore> 
    </consumerMailStores> 
  </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.RemoveExchangeResources(preferredDomainController, publicStoresXMLString, mailStoresXmlString, frontEndServersXmlString, consumerMailStoresXmlString, 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 Ex::AddExchangeResources