Item Property

This read-only property accesses a site in the site restriction list.

Syntax

ISiteRestrictions[.Item(Name)]

Settings

Name

The name of the site.

Remarks

Since ISiteRestrictions is a collection, you need only include Item to access an ISiteRestriction object by name (see the following Example).

Example

The following example displays the names of all sites in the site restriction lists for all catalogs.

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.objSites 
  Wscript.Echo objCatalog.Name & " restricts the following sites:" 

  For Each objSite in objSites
    Wscript.Echo objSite.Name
  Next

  Wscript.Echo ""
Next

'Release objects 
Set objSite     = Nothing 
Set objSites    = Nothing 
Set objCatalog  = Nothing 
Set objCatalogs = Nothing 
Set objBuildServer = Nothing 
Set objSearchAdmin = Nothing 
 

See Also

Add, Count, ISiteRestriction, Remove


© 1997-1998 Microsoft Corporation. All rights reserved.