Delete

The ADSI container object Delete method deletes an object from a container.

Syntax

Object.Delete (KeyType, Name)

 

Parts
object
Contains an IIS Admin Object, usually as a result of a previous GetObject operation.
KeyType
The type of IIS Admin Object to delete.
Name
The name of the object to delete.
Remarks

When the contained object to be deleted is part of an application, the Delete method will remove the application definition before deleting the object. See the AppDelete method of the IIsWebVirtualDir and IIsWebDirectory objects.

Code Example
<% 
  Dim WebServiceObj 
'Get the Web service object, which contains servers. 
  Set WebServiceObj = GetObject("IIS://LocalHost/W3SVC") 
'Delete the fourth server. 
  WebServiceObj.Delete "IIsWebServer", "4" 
%> 
 
See Also

GetObject, Create, CopyHere, MoveHere