Enum Method

This method lists the global parameters for the Content Deployment service.

Syntax

ReplicationServer.Enum(Iterator, ParamName)

Parameters

Iterator

Used by the service to enumerate the list of parameters. This value should be initialized to zero, and should not be modified.

ParamName

Used by the service to enumerate the names of the parameters. This value should be initialized to an empty string, "", and should not be modified.

Remarks

You must have Site Server Publishing administrator privileges on the server to call this method.

For a list of parameters that can be retrieved from the Content Deployment service, see the Parameters appendix.

Example

The following example displays the names and values of the service parameters.

Option Explicit 
On Error Resume Next 

const CRS_ERROR_NO_MORE_ITEMS  = 0&80003B17

dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")

dim ParamName
ParamName = ""
dim ParamValue
dim Iterator
Iterator = 0
dim ReplError

do while True
  'Clear any error text
  Err.Clear

  ParamValue = ReplServer.Enum(Iterator, ParamName)

  'Quit if "No more items" error 

  ReplError = Err.Number
  if ReplError = CRS_ERROR_NO_MORE_ITEMS then exit do

  Wscript.Echo "Parameter " & ParamName & " = " & ParamValue
Loop
'Release Server object
set ReplServer = Nothing

See Also

EnumProjects, EnumReplications, EnumRoutes


© 1997-1998 Microsoft Corporation. All rights reserved.