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

PI Powershell

AddPITrust Class

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

Add a PI Security Trust

The Add-PITrust cmdlet adds 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.PowerShellOSICmdletBaseWithConnection
            OSIsoft.PowerShellAddPITrust

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)

Syntax

[CmdletAttribute("Add", "PITrust", SupportsShouldProcess = true)]
public class AddPITrust : OSICmdletBaseWithConnection
<CmdletAttribute("Add", "PITrust", SupportsShouldProcess := true)>
Public Class AddPITrust
	Inherits OSICmdletBaseWithConnection

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

The AddPITrust type exposes the following members.

Constructors

  NameDescription
Public method
AddPITrust

Properties

  NameDescription
Public property
ApplicationName

Application name for the PI Trust to add

Public property
Connection

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

(Overrides OSICmdletBaseWithConnectionConnection.)
Public property
Description

Description of the PI Trust to add

Public property
Disabled

Mark the PI Trust as Disabled

Public property
Identity

PI Identity of the PI Trust to add

Public property
IPAddress

IP Address of the PI Trust to add

Public property
Name

Name of the PI Trust to add

Public property
NetMask

NetMask of the PI Trust to add

Public property
NetworkPath

Hostname or Fully Qualified Domain Name (FQDN) of the PI Trust to add

Public property
WindowsAccount

Windows Account of the PI Trust to add

Public property
WindowsDomain

Windows Domain of the PI Trust to add

Examples

Add-PITrust -Name "PIINT1_OPC_IP" -Identity "InterfacesAndBuffering" -Description "Trust for OPC Interface on PIINT1 node via IP Address" -IPAddress "10.32.108.64" -NetMask "255.255.255.255" -ApplicationName "OPCpE.exe" -Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Creates a "2+" trust for an OPC Interface on the machine with IP Address 10.32.108.64. The trust will allow permissions of the "InterfacesAndBuffering" identity on the "PISRV1" PI Data Archive.

See Also

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