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

PI Powershell

SetPIIdentity Class

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

Set a PI Security Identity

The Set-PIIdentity cmdlet edits an existing PI Security Identity. To rename a PI Identity, use the Rename-PIIdentity cmdlet.

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

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellSetPIIdentity

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

Syntax

[CmdletAttribute("Set", "PIIdentity", SupportsShouldProcess = true, 
	DefaultParameterSetName = "Description")]
public class SetPIIdentity : OSICmdletBase
<CmdletAttribute("Set", "PIIdentity", SupportsShouldProcess := true, 
	DefaultParameterSetName := "Description")>
Public Class SetPIIdentity
	Inherits OSICmdletBase

Dim instance As SetPIIdentity
[CmdletAttribute(L"Set", L"PIIdentity", SupportsShouldProcess = true, 
	DefaultParameterSetName = L"Description")]
public ref class SetPIIdentity : public OSICmdletBase
[<CmdletAttribute("Set", "PIIdentity", SupportsShouldProcess = true, 
	DefaultParameterSetName = "Description")>]
type SetPIIdentity =  
    class
        inherit OSICmdletBase
    end

The SetPIIdentity type exposes the following members.

Constructors

  NameDescription
Public method
SetPIIdentity

Properties

  NameDescription
Public property
AllowExplicitLogin

Allow explicit login for the PI Identity

Public property
AllowUseInMappings

Allow use in mappings for the PI Identity

Public property
AllowUseInTrusts

Allow use in mappings for the PI Identity

Public property
CanDelete

Allow deletion of the PI Identity

Public property
Connection

Connection to a PI Data Archive for which to edit the PI Identity

Public property
Description

Description of the PI Identity to set

Public property
Enabled

Mark the PI Identity to add as enabled

Public property
Name

Name of the PI Identity to set

Examples

Set-PIIdentity -Name PIEngineers -Enabled $false -CanDelete $true -AllowUseInMappings $true -AllowUseInTrusts $true -AllowExplicitLogin $false -Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Edits the PI Identity "FloorEngineers" as can be deleted, disables the identity, allowed for use in both mappings and trusts, and disables explicit login on the "PISRV1" PI Data Archive server.

Note that $true and $false should be used to pass boolean values in PowerShell. However, you can also pass 0 for $false and 1 for $true. However, using the PowerShell boolean values helps improve read-ability.

See Also

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