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

PI Powershell

SetPIUserPassword Class

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

Set the password for an existing PI User on a PI Data Archive

The Set-PIUserPassword cmdlet sets the password for 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.PowerShellSetPIUserPassword

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)

Syntax

[CmdletAttribute("Set", "PIUserPassword", SupportsShouldProcess = true)]
public class SetPIUserPassword : OSICmdletBase
<CmdletAttribute("Set", "PIUserPassword", SupportsShouldProcess := true)>
Public Class SetPIUserPassword
	Inherits OSICmdletBase

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

The SetPIUserPassword type exposes the following members.

Constructors

  NameDescription
Public method
SetPIUserPassword

Properties

  NameDescription
Public property
Connection

Connection to a PI Data Archive for which to set the PI User Password

Public property
ExistingPassword

Current password for the PI User to set a new PI User password. The password is accepted as a SecureString object.

Use ConvertTo-SecureString to convert a string to a secure string.

Public property
Name

Name of the PI User for which to set a new PI User Password

Public property
NewPassword

New password to set for the PI User. The new password is accepted as a SecureString object.

Use ConvertTo-SecureString to convert a string to a secure string.

Examples

Set-PIUserPassword -Name "John Doe" -ExistingPassword (ConvertTo-SecureString -string "password" -AsPlainText -Force) -NewPassword (ConvertTo-SecureString -string newP@ssw0rd -AsPlainText -Force) -Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

This example sets a new PI User Password for the existing PI User "John Doe" on the "PISRV1" PI Data Archive.

Use "Get-Help ConvertTo-SecureString -Full" for more information on ConvertTo-SecureString cmdlet.

See Also

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