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

PI Powershell

ConnectPIDataArchive.PIUsername Property

  • Last UpdatedDec 15, 2025
  • 2 minute read
ConnectPIDataArchive.PIUsername Property

PI Username to use when connecting to the PI Data Archive. Used in conjunction with Password.

Note: Explicit Login has been superseded by connecting via Windows Integrated Security (WIS) or PI Trusts. It is strongly recommended to connect via these authentication methods instead of explicit login. See -AuthenticationMethod parameter for details on connecting via WIS or PI Trusts.

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)

Syntax

[ParameterAttribute(Position = 1, Mandatory = true, ParameterSetName = "MachineNameViaPIUser", 
	HelpMessage = "PI username")]
[ParameterAttribute(Position = 0, Mandatory = true, ParameterSetName = "ConnectionConfigurationViaPIUser", 
	HelpMessage = "PI username")]
[ValidateNotNullOrEmptyAttribute]
public string PIUsername { get; set; }
<ParameterAttribute(Position := 1, Mandatory := true, ParameterSetName := "MachineNameViaPIUser", 
	HelpMessage := "PI username")>
<ParameterAttribute(Position := 0, Mandatory := true, ParameterSetName := "ConnectionConfigurationViaPIUser", 
	HelpMessage := "PI username")>
<ValidateNotNullOrEmptyAttribute>
Public Property PIUsername As String
	Get
	Set

Dim instance As ConnectPIDataArchive
Dim value As String

value = instance.PIUsername

instance.PIUsername = value
public:
[ParameterAttribute(Position = 1, Mandatory = true, ParameterSetName = L"MachineNameViaPIUser", 
	HelpMessage = L"PI username")]
[ParameterAttribute(Position = 0, Mandatory = true, ParameterSetName = L"ConnectionConfigurationViaPIUser", 
	HelpMessage = L"PI username")]
[ValidateNotNullOrEmptyAttribute]
property String^ PIUsername {
	String^ get ();
	void set (String^ value);
}
[<ParameterAttribute(Position = 1, Mandatory = true, ParameterSetName = "MachineNameViaPIUser", 
	HelpMessage = "PI username")>]
[<ParameterAttribute(Position = 0, Mandatory = true, ParameterSetName = "ConnectionConfigurationViaPIUser", 
	HelpMessage = "PI username")>]
[<ValidateNotNullOrEmptyAttribute>]
member PIUsername : string with get, set

Property Value

Type: String

See Also

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