SetPIIdentity Class
- Last UpdatedDec 15, 2025
- 3 minute read
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
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellOSICmdletBaseWithConnection
OSIsoft.PowerShellSetPIIdentity
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Set", "PIIdentity", SupportsShouldProcess = true, DefaultParameterSetName = "Description")] public class SetPIIdentity : OSICmdletBaseWithConnection
<CmdletAttribute("Set", "PIIdentity", SupportsShouldProcess := true, DefaultParameterSetName := "Description")> Public Class SetPIIdentity Inherits OSICmdletBaseWithConnection Dim instance As SetPIIdentity
[CmdletAttribute(L"Set", L"PIIdentity", SupportsShouldProcess = true, DefaultParameterSetName = L"Description")] public ref class SetPIIdentity : public OSICmdletBaseWithConnection
[<CmdletAttribute("Set", "PIIdentity", SupportsShouldProcess = true, DefaultParameterSetName = "Description")>] type SetPIIdentity = class inherit OSICmdletBaseWithConnection end
The SetPIIdentity type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| SetPIIdentity |
Properties
| Name | Description | |
|---|---|---|
| AllowExplicitLogin | Allow explicit login for the PI Identity | |
| AllowUseInMappings | Allow use in mappings for the PI Identity | |
| AllowUseInTrusts | Allow use in mappings for the PI Identity | |
| CanDelete | Allow deletion of the PI Identity | |
| Connection | Connection to a PI Data Archive for which to edit the PI Identity | |
| Description | Description of the PI Identity to set | |
| Enabled | Mark the PI Identity to add as enabled | |
| 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.