GetPIMapping Class
- Last UpdatedDec 15, 2025
- 3 minute read
Get a PI Security Mapping
The Get-PIMapping cmdlet gets 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.PowerShellGetPIMapping
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)
Syntax
[CmdletAttribute("Get", "PIMapping", SupportsShouldProcess = true)] public class GetPIMapping : OSICmdletBase
<CmdletAttribute("Get", "PIMapping", SupportsShouldProcess := true)> Public Class GetPIMapping Inherits OSICmdletBase Dim instance As GetPIMapping
[CmdletAttribute(L"Get", L"PIMapping", SupportsShouldProcess = true)] public ref class GetPIMapping : public OSICmdletBase
[<CmdletAttribute("Get", "PIMapping", SupportsShouldProcess = true)>] type GetPIMapping = class inherit OSICmdletBase end
The GetPIMapping type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| GetPIMapping |
Properties
| Name | Description | |
|---|---|---|
| Connection | Connection to a PI Data Archive for which to get the PI Mapping | |
| Name | Name of the PI Mapping to get |
Examples
Get-PIMapping -Name "Windows_S-1-5-21-2084324470-1890137325-1469997231-53017" -Connection $conWhere:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
Gets the PI Mapping "Windows_S-1-5-21-2084324470-1890137325-1469997231-53017" from 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
Get-PIMapping -Name "*" -Connection $conWhere:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
Gets all PI Mappings from the "PISRV1" PI Data Archive server.
Examples
Get-PIMapping -Name "*" -Connection $con | Where-Object -Property Identity -eq "piadmin"
Where:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
Gets a list of only PI Mappings which are mapped to the "piadmin" identity on the "PISRV1" Data Archive server. This might be helpful when trying to better lock down access to the PI Data Archive.