Delete

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

Syntax

Object.Delete KeyType, Name
 

Parts

object
The IIS Admin Object that contains the object. Usually the 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


© 1997 by Microsoft Corporation. All rights reserved.