SPServerCollection Class
Represents a collection of SPServer objects.
System.Object
Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPServer>
Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPServer>
Microsoft.SharePoint.Administration.SPServerCollection
Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPServer>
Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPServer>
Microsoft.SharePoint.Administration.SPServerCollection
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Use either the Servers property of the SPFarm class, or the SPServerCollection constructor, to get the collection of servers that is used in the specified server farm.
Use an indexer to return a single server from the collection. For example, if the collection is assigned to a variable named myServers, use myServers[index] in C#, or myServers(index) in Visual Basic, where index is either the GUID or the name that identifies the service.