Identifying the IIS resources of a server by using XML

Use the QueryResourcesByServer procedure of the IIS Resource Manager namespace to return all Web site resources in use by a particular computer. If present, the "Allocated To" attribute of each tag indicates that the resource is allocated, and to which Web site it is allocated.

This procedure runs as the Microsoft Provisioning Framework (MPF) service account in order to make calls to the Resource Manager database.

Example of a request that calls the QueryResourcesByServer procedure

<request>
 <procedure>
   <execute namespace="IIS Resource Manager" procedure="QueryResourcesByServer">
	 <executeData>
	 <serverName>machine01</serverName>
	 </executeData>
	 <after source="executeData" sourcePath="server" destination="data" />
   </execute>
  </procedure>
</request>

Input for QueryResourcesByServer

The following input is valid for this request:

Typical response for QueryResourcesByServer

This request returns all the local disk volumes on the computer specified in the <serverName> tag, the Internet Protocol (IP) addresses assigned to that computer and the number of host header defined sites for each IP address. In addition, this request returns the status of ports 21 and 80; if the <port21Free> and <port80Free> tags are not present, the ports are allocated.

<response>
 <data>
   <server>
	 <serverName>machine01</serverName>
	 <IPAddresses>
		 <IPAddress>
		 <address>157.60.0.1</address>
		 <port21Free/>
		 <port80Free/>
		 <hostHeaderSiteCount>0</hostHeaderSiteCount>
		 </IPAddress>
	 </IPAddresses>
	<volumes>
		<volume>
		<location>d:</location>
		<megabytes>40000</megabytes>
		<megabytesFree>40000</megabytesFree>
		</volume>
		<volume>
		<location>c:</location>
		<megabytes>30000</megabytes>
		<megabytesFree>30000</megabytesFree>
		</volume>
	</volumes>
	</server>
  </data>
</response>

Important