Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

PIServers.Add Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
PIServers.Add Method
Registers a new PIServer to the list of known servers on the local machine.

Namespace:  OSIsoft.AF.PI
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public PIServer Add(
	string name
)
Public Function Add ( 
	name As String
) As PIServer

Dim instance As PIServers
Dim name As String
Dim returnValue As PIServer

returnValue = instance.Add(name)
public:
PIServer^ Add(
	String^ name
)
member Add : 
        name : string -> PIServer 

Parameters

name
Type: SystemString
The name of the desired name for the PIServer as it is known on the local machine. This name must be unique from all other local PIServer names on the local machine. See the ValidateName(String, String) method for a description of what is valid when setting the name of the object.

Return Value

Type: PIServer
Returns the newly created PIServer object.

Remarks

This method is used to add an entry to the list of known PI Data Archive servers on the local machine.

Version Information

AFSDK


See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in