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

PI Powershell

SetPIUser Class

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

Edits an existing PI User on a PI Data Archive

The Set-PIUser cmdlet edits an existing PI User on a PI Data Archive

The connection parameter specifies which connection to a PI Data Archive to use.

NOTE: PI Users and PI Groups have been replaced by PI Identities. PI Identities with PI Mappings (WIS) and PI Trusts should be used to configure PI Data Archive security. See KB00833 for more information.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellOSICmdletBaseWithConnection
            OSIsoft.PowerShellSetPIUser

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)

Syntax

[CmdletAttribute("Set", "PIUser", SupportsShouldProcess = true)]
public class SetPIUser : OSICmdletBaseWithConnection
<CmdletAttribute("Set", "PIUser", SupportsShouldProcess := true)>
Public Class SetPIUser
	Inherits OSICmdletBaseWithConnection

Dim instance As SetPIUser
[CmdletAttribute(L"Set", L"PIUser", SupportsShouldProcess = true)]
public ref class SetPIUser : public OSICmdletBaseWithConnection
[<CmdletAttribute("Set", "PIUser", SupportsShouldProcess = true)>]
type SetPIUser =  
    class
        inherit OSICmdletBaseWithConnection
    end

The SetPIUser type exposes the following members.

Constructors

  NameDescription
Public method
SetPIUser

Properties

  NameDescription
Public property
Connection

Connection to a PI Data Archive for which to edit the PI User

(Overrides OSICmdletBaseWithConnectionConnection.)
Public property
Description

Description to set for the PI User

Public property
Name

Name of the PI User to edit

Public property
PIGroups

PI Groups to set for the PI User

Examples

Set-PIUser -Name "John Doe" -Description "Lead Floor Engineer" -PIGroups "EngineerLeadsGroup","PIReadersGroup","PIEngineersGroup" -Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

This example edits an existing PI User "John Doe" on the "PISRV1" PI Data Archive with an updated description and is assigned to three PI Groups.

See Also

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