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

AF SDK Reference

PIServers.Remove Method (PIServer)

  • Last UpdatedNov 18, 2025
  • 2 minute read
PIServers.Remove Method (PIServer)
Unregisters the specified PIServer.

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

Syntax

public bool Remove(
	PIServer item
)
Public Function Remove ( 
	item As PIServer
) As Boolean

Dim instance As PIServers
Dim item As PIServer
Dim returnValue As Boolean

returnValue = instance.Remove(item)
public:
virtual bool Remove(
	PIServer^ item
) sealed
abstract Remove : 
        item : PIServer -> bool 
override Remove : 
        item : PIServer -> bool 

Parameters

item
Type: OSIsoft.AF.PIPIServer
The item in the collection to be unregistered.

Return Value

Type: Boolean
Returns is the item was successfully removed.

Implements

ICollectionTRemove(T)

Exceptions

ExceptionCondition
InvalidOperationException This exception is thrown if an attempt is made to remove the last PIServer in the list.

Remarks

This method is used to unregister an existing PIServer entry from the list of known PI Data Archive servers on the local machine. This does not affect the configuration of servers on other client computers.
Important note Important
The last PIServer in the list is not allowed to be removed.

Version Information

AFSDK


See Also

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