SetPIUserPassword Class
- Last UpdatedDec 15, 2025
- 3 minute read
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
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellOSICmdletBaseWithConnection
OSIsoft.PowerShellSetPIUserPassword
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Set", "PIUserPassword", SupportsShouldProcess = true)] public class SetPIUserPassword : OSICmdletBaseWithConnection
<CmdletAttribute("Set", "PIUserPassword", SupportsShouldProcess := true)> Public Class SetPIUserPassword Inherits OSICmdletBaseWithConnection Dim instance As SetPIUserPassword
[CmdletAttribute(L"Set", L"PIUserPassword", SupportsShouldProcess = true)] public ref class SetPIUserPassword : public OSICmdletBaseWithConnection
[<CmdletAttribute("Set", "PIUserPassword", SupportsShouldProcess = true)>] type SetPIUserPassword = class inherit OSICmdletBaseWithConnection end
The SetPIUserPassword type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| SetPIUserPassword |
Properties
| Name | Description | |
|---|---|---|
| Connection | Connection to a PI Data Archive for which to set the PI User Password | |
| 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. | |
| Name | Name of the PI User for which to set a new PI User Password | |
| 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.