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

PI Powershell

GetPITrust Class

  • Last UpdatedDec 15, 2025
  • 3 minute read
GetPITrust Class

Get a PI Security Trust

The Get-PITrust cmdlet gets a PI Trust

The connection parameter specifies which connection to a PI Data Archive to use.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellGetPITrust

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

Syntax

[CmdletAttribute("Get", "PITrust", SupportsShouldProcess = true)]
public class GetPITrust : OSICmdletBase
<CmdletAttribute("Get", "PITrust", SupportsShouldProcess := true)>
Public Class GetPITrust
	Inherits OSICmdletBase

Dim instance As GetPITrust
[CmdletAttribute(L"Get", L"PITrust", SupportsShouldProcess = true)]
public ref class GetPITrust : public OSICmdletBase
[<CmdletAttribute("Get", "PITrust", SupportsShouldProcess = true)>]
type GetPITrust =  
    class
        inherit OSICmdletBase
    end

The GetPITrust type exposes the following members.

Constructors

  NameDescription
Public method
GetPITrust

Properties

  NameDescription
Public property
Connection

Connection to a PI Data Archive for which to get the PI Trust

Public property
Name

Name of the PI Trust to get

Examples

Get-PITrust -Name "PIINT1_OPC_IPAddress" -Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Gets the PI Trust "PIINT1_OPC_IPAddress" from the "PISRV1" PI Data Archive server.

Examples

Get-PITrust -Name "PIINT1*" -Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Gets all PI Trusts that start with PIINT1 from the "PISRV1" PI Data Archive server. Wildcards are supported by the -Name parameter in this cmdlet.

Examples

Get-PITrust -Name "*" -Connection $con | Group-Object -Property ApplicationName

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Gets a list of all PI Trusts on the "PISRV1" Data Archive server and groups the results by the ApplicationName the trust is configured for.

See Also

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