Removing IIS resources by using XML

Use the RemoveIISResources procedure of the IIS Resource Manager namespace to remove IIS disk volumes, IP addresses, and possibly all computers running IIS from the pool of resources managed by IIS Resource Manager. The IIS computer resource is deleted automatically if all of its disk volumes and IP address are removed.

This procedure generates an error if you try to remove a resource from the pool when the resource is being used by a Web site. You have to deallocate the resource before you remove it from the pool. When volumes are removed, the system deletes the associated hosting directory created in the volume when the resource was added.

This procedure runs as the Microsoft Provisioning Framework service account for calls to the Resource Manager database, and it impersonates the caller when creating directories and when creating and setting Web and FTP site permissions.

Important

Example of a request that calls the RemoveIISResources procedure

<request>
  <execute namespace="IIS Resource Manager" procedure="RemoveIISResources">
	<executeData>
	<servers>
		<server>
		<serverName>machine01</serverName>
		<volumes>
			<volume>
			<location>c:</location>
			</volume>
			<volume>
			<location>d:</location>
			</volume>
		</volumes>
		<IPAddresses>
			<IPAddress>157.60.0.1</IPAddress>
			<IPAddress>157.60.0.2</IPAddress>
			<IPAddress>157.60.0.3</IPAddress>
		</IPAddresses>
		</server>
	 </servers>
	 </executeData>
  </execute>
</request>

Input for RemoveIISResources

You can supply input for more than one server in the same request by supplying multiple <server> tags. The following input is valid for this request:

Typical response for RemoveIISResources

The response to this procedure does not contain significant data.

Important