AddPIMapping Class
- Last UpdatedDec 15, 2025
- 3 minute read
Add a PI Security Mapping
The Add-PIMapping cmdlet adds a PI Security Mapping
The connection parameter specifies which connection to a PI Data Archive to use.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellAddPIMapping
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)
Syntax
[CmdletAttribute("Add", "PIMapping", SupportsShouldProcess = true)] public class AddPIMapping : OSICmdletBase
<CmdletAttribute("Add", "PIMapping", SupportsShouldProcess := true)> Public Class AddPIMapping Inherits OSICmdletBase Dim instance As AddPIMapping
[CmdletAttribute(L"Add", L"PIMapping", SupportsShouldProcess = true)] public ref class AddPIMapping : public OSICmdletBase
[<CmdletAttribute("Add", "PIMapping", SupportsShouldProcess = true)>] type AddPIMapping = class inherit OSICmdletBase end
The AddPIMapping type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| AddPIMapping |
Properties
| Name | Description | |
|---|---|---|
| Connection | Connection to a PI Data Archive for which to add the PI Mapping | |
| Description | Description for the PI Mapping to add | |
| Disabled | Mark the PI Mapping to add as disabled | |
| Identity | PI Identity to assign to the PI Mapping to add | |
| Name | Name of the PI Mapping to add | |
| PrincipalName | Principal Name of the PI Mapping to add |
Examples
Add-PIMapping -Name "TestMapping" -Identity "PIEngineers" -PrincipalName "exampledomain\jdoe" -Description "PI Mapping for John Doe" -Connection $con
Where:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
Adds the PI Mapping "TestMapping" for John Doe on the "PISRV1" PI Data Archive server. John Doe is mapped to the PIEngineers identity.
Examples
Add-PIMapping -Name "Domain Users Mapping" -Identity "DomainUsersReadOnly" -PrincipalName "exampledomain\domainusers" -Description "Mapping for all domain users" -Disabled -Connection $con
Where:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
Adds the PI Mapping "Domain Users Mapping" for the windows group "domain\domainusers" on the "PISRV1" PI Data Archive server. Example\domainusers is mapped to a custom PI Identity "DomainUsersReadOnly" and is disabled upon creation. This will allow the mapping to not be effective immediately, and can be enabled later.