SetPIMapping Class
- Last UpdatedDec 15, 2025
- 3 minute read
Set a PI Security Mapping
The Set-PIMapping cmdlet edits and existing PI Security Mapping
The connection parameter specifies which connection to a PI Data Archive to use.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellOSICmdletBaseWithConnection
OSIsoft.PowerShellSetPIMapping
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Set", "PIMapping", SupportsShouldProcess = true)] public class SetPIMapping : OSICmdletBaseWithConnection
<CmdletAttribute("Set", "PIMapping", SupportsShouldProcess := true)> Public Class SetPIMapping Inherits OSICmdletBaseWithConnection Dim instance As SetPIMapping
[CmdletAttribute(L"Set", L"PIMapping", SupportsShouldProcess = true)] public ref class SetPIMapping : public OSICmdletBaseWithConnection
[<CmdletAttribute("Set", "PIMapping", SupportsShouldProcess = true)>] type SetPIMapping = class inherit OSICmdletBaseWithConnection end
The SetPIMapping type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| SetPIMapping |
Properties
| Name | Description | |
|---|---|---|
| Connection | Connection to a PI Data Archive for which to set the PI Mapping | |
| Description | Description for the PI Mapping to add | |
| Disabled | Mark the PI Mapping to set as disabled | |
| Identity | PI Identity to assign to the PI Mapping to set | |
| Name | Name of the PI Mapping to set | |
| PrincipalName | Principal Name of the PI Mapping to set |
Examples
Set-PIMapping -Name "Windows_S-1-5-21-2084324470-1890137325-1469997231-42999" -Disabled $true -Connection $con
Where:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
Disables the PI Mapping "Windows_S-1-5-21-2084324470-1890137325-1469997231-42999" on the "PISRV1" PI Data Archive server.
Note that name of the mapping is typically Windows_[WindowsSID] where [WindowsSID] is the Windows SID of the Windows User or Group the mapping is for.
Examples
Set-PIMapping -Name "Windows_S-1-5-21-2084324470-1890137325-1469997231-42999" -Identity "piadmins" -Connection $con
Where:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
Sets the identity for the PI Mapping "Windows_S-1-5-21-2084324470-1890137325-1469997231-42999" to be "piadmins", overwriting whatever the previous identity was set as.
Note: The name of the mapping is typically Windows_[WindowsSID] where [WindowsSID] is the Windows SID of the Windows User or Group the mapping is for.
Note: $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.