Identifying all Exchange resources by using XML

Use the QueryAllStores procedure of the Exchange Resource Manager namespace to return all Exchange resources that have been added to the system. The returned data includes both the total storage and available storage (in megabytes).

This procedure expects to be called with impersonate="1". The procedure impersonates the caller.

Example of a request that calls the QueryAllStores procedure

<request>
 <procedure>
   <execute namespace="Exchange Resource Manager" procedure="QueryAllStores">
	 <executeData/>
	 <after source="executeData" destination="data" />
	</execute>
 </procedure>
</request>

Input for QueryAllStores

No input is required.

Typical response for QueryAllStores

This request returns a list of the globally unique identifiers (GUIDs) and server names for all public stores and mail stores in the system and indicates (in the <shared> element) whether the store is shared by multiple organizations (a value of 1) or owned by a single organization (a value of 0). In addition, this request returns the available (free) and allocated disk volume space for these public and mail stores.

<response>
 <data>
   <publicStores>
	 <publicStore>
	 <GUID>{717dceea-ca48-44c5-a617-ba71f6a0bea8}</GUID>
	 <serverName>CONTOSO1</serverName>
	 <megabytes>10000</megabytes>
	 <megabytesFree>9400</megabytesFree>
	 </publicStore>
   </publicStores>
   <mailStores>
	 <mailStore>
	 <GUID>{08fd2bcd-dcd6-4d80-9cd4-1e88069e37f8}</GUID>
	 <serverName>CONTOSO1</serverName>
	 <mailStoreName>Mailbox Store 3 (CONTOSO1)</mailStoreName>
	 <megabytes>8000</megabytes>
	 <megabytesFree>7400</megabytesFree>
	 <shared>0</shared>
	 </mailStore>
	 <mailStore>
	 <GUID>{1a342a57-8e61-49d3-a656-e675045ff5bb}</GUID>
	 <serverName>CONTOSO1</serverName>
	 <mailStoreName>Mailbox Store 2 (CONTOSO1)</mailStoreName>
	 <megabytes>8000</megabytes>
	 <megabytesFree>8000</megabytesFree>
	 <shared>0</shared>
	 </mailStore>
	 <mailStore>
	 <GUID>{be0d70b9-5678-404f-a3ff-3c0c076c95de}</GUID>
	 <serverName>CONTOSO1</serverName>
	 <mailStoreName>Mailbox Store (CONTOSO1)</mailStoreName>
	 <megabytes>8000</megabytes>
	 <megabytesFree>7800</megabytesFree>
	 <shared>1</shared>
	 </mailStore>
   </mailStores>
  </data>
</response>

Important