Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can use the following VBScript code sample to add a new Class object to the IIS ADSI Schema.
To create a Class object, follow these steps:
Bind to the Schema container.
Create a new Class object.
Write the new Class object to the metabase.
Example Code
The following example shows you how to use the VBScript programming language to a new class object in the IIS ADSI schema.
' Get the parameters for the machinename
Dim ArgObj
Set ArgObj=WScript.Arguments
MachineName = ArgObj.Item (0)
ClassName = ArgObj.Item (1)
' Bind to the Schema container object.
Dim SchemaObj
Dim NewClassObj
Set SchemaObj = GetObject ("IIS://" & MachineName & "/Schema")
' Create a new Class object for ClassName.
Set NewClassObj = SchemaObj.Create ("Class", ClassName)
' Write the new Class object to the metabase.
NewClassObj.SetInfo