Better than what? How do you delete these objects today? I suppose that
using IIS Manager should work fine, doesn't it?
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
"Enthus" <Enthus.DeleteThis@discussions.microsoft.com> skrev i meddelandet
news:972DE99D-FCE0-4436-B6D4-47CEA7770110@microsoft.com...
>I guess there is nothing wrong with script. I just used Metabase explorer
>on
> the local host and remote computer these deleted virtual directories still
> exist in it. Is there a better way to delete unused / retired virtual
> directories from IIS 5 so that they get deleted from metabase as well?
>
>
>
>
>
> "Enthus" wrote:
>
>> Hi
>> I am using the following snippet on IIS 5 servers and it is still
>> retrieving
>> deleted (long time back) virtual directories as well. Can you please let
>> me
>> know what is wrong with the script? By the way I am running this on
>> remote
>> computers as well and same results for them too.
>>
>> strComputer="localhost"
>>
>> Set objWeb = GetObject("IIS://" &strComputer& "/W3SVC")' Get handle to
>> IIS
>> server
>> If Err.Number <> 0 Then
>> Wscript.echo "Error in Main"
>> Else
>> For Each objWebServer IN objWeb
>> If objWebserver.Class = "IIsWebServer" Then
>> webSiteName=objWebserver.Name
>> listVDirs(webSiteName)
>> End If 'End of Web Server Check
>> Next ' End of For loop
>> End If 'End of ADSI Object
>> Set objWeb = Nothing
>>
>>
>> Sub listVDirs(webSN)
>> On Error Resume Next
>> Set objVDir = GetObject("IIS://" &strComputer& "/W3SVC/" & webSN &
>> "/ROOT")
>> If Err.Number <> 0 Then
>> Wscript.echo "Error in Sub"
>> Else
>> For Each vDir In objVDir
>> vDirName = vDir.Name
>> Wscript.echo vDirName
>> Next 'End of For loop
>> End If 'End of Virtual Enumeration
>> Set objVDir = Nothing
>> End Sub
>> >> Stay informed about: IIS ADSI object