This read-only property specifies the sites (ISiteRestrictions interface) that Search crawls or avoids.
Syntax
IBuildCatalog.Sites
Example
The following example displays the sites for all catalog definitions.
Option Explicit
On Error Resume Next
Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objSites, objSite
Set objSearchAdmin = CreateObject("Search.SearchAdmin.1")
Set objBuildServer = objSearchAdmin.BuildServer
Set objCatalogs = objBuildServer.BuildCatalogs
For Each objCatalog in objCatalogs
Set objSites = objCatalog.Sites
If objSites.Count = 0 Then
Wscript.Echo objCatalog.Name & " does not include/exclude any sites."
Else
Wscript.Echo objCatalog.Name & " includes/excludes the following sites:"
For Each objSite in objSites
If Restriction.Included Then
Wscript.Echo " " & objSite.Name & " is included."
Else
Wscript.Echo " " & objSite.Name & " is excluded."
End If
Next
Wscript.Echo ""
End If
Next
'Release objects
Set objSite = Nothing
Set objSites = Nothing
Set objCatalog = Nothing
Set objCatalogs = Nothing
Set objBuildServer = Nothing
Set objSearchAdmin = Nothing
See Also
StartPages, ISiteRestrictions interface