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

AF SDK Reference

PIServers.GetPIServers Method (String, String, Boolean)

PIServers.GetPIServers Method (String, String, Boolean)

  • Last UpdatedNov 18, 2025
  • 2 minute read
PIServers.GetPIServers Method (String, String, Boolean)
Get the list of known PIServers on the local machine.

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

Syntax

public static PIServers GetPIServers(
	string clientId,
	string clientSecret,
	bool forceNewInstance = false
)
Public Shared Function GetPIServers ( 
	clientId As String,
	clientSecret As String,
	Optional forceNewInstance As Boolean = false
) As PIServers

Dim clientId As String
Dim clientSecret As String
Dim forceNewInstance As Boolean
Dim returnValue As PIServers

returnValue = PIServers.GetPIServers(clientId, 
	clientSecret, forceNewInstance)
public:
static PIServers^ GetPIServers(
	String^ clientId, 
	String^ clientSecret, 
	bool forceNewInstance = false
)
static member GetPIServers : 
        clientId : string * 
        clientSecret : string * 
        ?forceNewInstance : bool 
(* Defaults:
        let _forceNewInstance = defaultArg forceNewInstance false
*)
-> PIServers 

Parameters

clientId
Type: SystemString
Client Id used to authenticate with OIDC.
clientSecret
Type: SystemString
Client Secret used to authenticate with OIDC.
forceNewInstance (Optional)
Type: SystemBoolean
Set to to force the creation of an independent collection of PIServers for the current client id with a separate cache.

Return Value

Type: PIServers
Returns the list of known PIServers on the local machine.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1

See Also

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