ServerCollection Class

The ServerCollection class represents a collection of Server objects in the topology of a server farm.

System.Object

   Microsoft.SharePoint.Portal.Topology.SqlCollectionBase

      Microsoft.SharePoint.Portal.Topology.TopologyObjectCollectionBase

          Microsoft.SharePoint.Portal.Topology.ServerCollection

Public Methods

The following table shows the public methods of the ServerCollection class and a brief description of each.

Name Description
Add(Microsoft.SharePoint.Portal.Topology.Server) Adds the specified Server object to the topology.
Remove(System.Guid) Removes the specified Server object from the topology.

Public Properties

The following table shows the properties of the ServerCollection class, the data type of each property, and a brief description of each.

Name Data type Description
Current Microsoft.SharePoint.Portal.Topology.Server Gets the Server object identifying the local server computer on which the code is executing.
Item(String) Microsoft.SharePoint.Portal.Topology.Server Returns a Server object specified by instance name.
Item(System.Guid) Microsoft.SharePoint.Portal.Topology.Server Returns a Server object specified by ID.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Remarks

Use the ServerCollection class to manage the Server objects in the topology of a server farm. The ServerCollection object corresponds to the list of Server objects in the Servers table of the configuration database.

To use the properties and methods of the objects in the Topology namespace you must be a member of the local STS_WPG and SPS_WPG security groups, and a member of the db_owner database role for the configuration database.

In addition, for certain methods, such as those that create a portal site, you must be a member of the local Administrators group, and have membership in the Database Creators and Security Administrators server roles in the SQL Server instance that hosts the configuration database.

Requirements

Namespace: Microsoft.SharePoint.Portal.Topology

Platforms: Microsoft Windows Server 2003

Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Security: Code Access Security