This method lists the routes defined on a server.
Syntax
ReplicationServer.EnumRoutes(Iterator)
Parameters
Iterator
Used by the service to enumerate the list of parameters. This value should be initialized to zero, and should not be modified.
Remarks
You must have Site Server Publishing administrator privileges on the server to call this method.
This method returns CRS_ERROR_NO_ROUTES when there are no routes defined on the server.
Example
The following example displays the names of the routes on the Content Deployment server.
Option Explicit
On Error Resume Next
const CRS_ERROR_NO_ROUTES = 15110
const CRS_ERROR_NO_MORE_ITEMS = 0&80003B17
dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")
dim Iterator
Iterator = 0
dim Routes
dim ReplError
Wscript.Echo "The content deployment server has the following routes"
do while True
'Clear any error text
Err.Clear
set ReplRoute = ReplServer.EnumRoutes(Iterator)
if IsEmpty(ReplRoute) then exit do
ReplError = Err.Number
if ReplError = CRS_ERROR_NO_ROUTES then exit do
if ReplError = CRS_ERROR_NO_MORE_ITEMS then exit do
Wscript.Echo ReplRoute.Name
Loop
'Release objects
set ReplRoute = Nothing
set ReplServer = Nothing
See Also
AddRoute, DeleteRoute, ReplicationRoute