Create

The ADSI container object Create method creates a new object in a container.

Syntax

Set NewObj = Object.Create(KeyType, Name)
 

Parts

NewObj
Accesses the new object created in the container.
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 create.
Name
The name for the new object.

Code Example

<% 
Dim WebServiceObj, ServerObj 
' Get the web service object, which contains servers 
Set WebServiceObj = GetObject("IIS://LocalHost/W3SVC") 
' Create a new web server object in the container 
Set ServerObj = WebServiceObj.Create("IIsWebServer", "3") 
' Add code to configure server and create Root virtual directory 
%> 
 

See Also

GetObject, Delete, CopyHere, MoveHere