Get

The ADSI Get method for IIS Admin Objects retrieves a metabase property value from the object into a variable. Some languages such as VBScript also support the object.property syntax as an alternative to the Get and Put methods.

Syntax

value = object.Get(property) 
or 
value = object.property 
 

Parts

value
Receives the returned value of the property.
object
Contains an IIS Admin Object, usually as a result of a previous GetObject operation.
property
A property of the object that has been retrieved from the metabase.

Code Example

<% 
Dim IIsObj, vRead, vWrite 
Set IIsObj = GetObject("IIS://LocalHost/W3SVC/1/Root") 
' Get the value from the object 
vRead = IIsObj.Get("AccessRead") 
' Can also use object.property syntax 
vWrite = IIsObj.AccessWrite 
' Set the values 
vRead = True 
vWrite = False 
' Put the values back in the object 
IIsObj.Put "AccessRead", vRead 
' Use optional object.property syntax 
IIsObj.AccessWrite = vWrite 
' Save the changes back to the metabase 
IIsObj.SetInfo 
%> 
 

See Also

GetInfo, SetInfo, Put, GetEx, PutEx, GetInfoEx