You can use the AppDeleteRecursive method of the IIsWebDirectory or IIsWebVirtualDir object to delete Web application definitions from a metabase key and all subkeys. If the applications are running, they will be shut down. If the application is in-process with IIS, all resources associated with the application, such as out-of-process packages, will be released if the resource is not referenced by another in-process application.
Note Server component DLLs are not released from in-process applications, even if they aren't currently referenced by other applications.
Deletions performed using AppDeleteRecursive cannot be undone.
DirObj.AppDeleteRecursive
<%
Dim DirObj
Set DirObj = GetObject("IIS://LocalHost/W3SVC/1/ROOT/MyAppDir")
'Delete the application at this directory
'and all subdirectories.
DirObj.AppDeleteRecursive
%>
AppCreate, AppDelete, AppUnload, AppUnloadRecursive, AppGetStatus, AppDisable, AppDisableRecursive, AppEnable, AppEnableRecursive, AspAppRestart