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

PI Powershell

AddPIMapping Class

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

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

SystemObject
  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

  NameDescription
Public method
AddPIMapping

Properties

  NameDescription
Public property
Connection

Connection to a PI Data Archive for which to add the PI Mapping

Public property
Description

Description for the PI Mapping to add

Public property
Disabled

Mark the PI Mapping to add as disabled

Public property
Identity

PI Identity to assign to the PI Mapping to add

Public property
Name

Name of the PI Mapping to add

Public property
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.

See Also

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