adsi and iis virtual directories
Hi all,
I'm trying to obtain the properties of my IIS5 sites through ADSI. Some I can get like IIS-path, site description, bindings and so on (see below). However, I'm a bit blank on how to get the physical paths for the site rootdirectories.
Could someone offer me a suggestion as to how to continue? Thanks a bunch!
Dim oIISAdmin As System.DirectoryServices.DirectoryEntry
Dim oChildDirectory As System.DirectoryServices.DirectoryEntry
Dim oProperties As System.DirectoryServices.DirectoryEntry
oIISAdmin = New System.DirectoryServices.DirectoryEntry("IIS://" + ServerName + "/W3SVC")
For Each oChildDirectory In oIISAdmin.Children
If IsNumeric(oChildDirectory.Name) Then
oWrite.WriteLine("IIS Path:" & oChildDirectory.Path)
oWrite.WriteLine("Site description:" & oChildDirectory.Properties("ServerComment").Value)
oWrite.WriteLine("Bindings:" & oChildDirectory.Properties("ServerBindings").Value )
End If
Next
|