SetPIDigitalStateSet Class
- Last UpdatedDec 15, 2025
- 3 minute read
Set a PI Digital State Set
The Set-PIDigitalStateSet cmdlet sets an existing PI Digital State Set on a PI Data Archive.
The connection parameter specifies which connection to a PI Data Archive to use.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellSetPIDigitalStateSet
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)
Syntax
[CmdletAttribute("Set", "PIDigitalStateSet", SupportsShouldProcess = true)] public class SetPIDigitalStateSet : OSICmdletBase
<CmdletAttribute("Set", "PIDigitalStateSet", SupportsShouldProcess := true)> Public Class SetPIDigitalStateSet Inherits OSICmdletBase Dim instance As SetPIDigitalStateSet
[CmdletAttribute(L"Set", L"PIDigitalStateSet", SupportsShouldProcess = true)] public ref class SetPIDigitalStateSet : public OSICmdletBase
[<CmdletAttribute("Set", "PIDigitalStateSet", SupportsShouldProcess = true)>] type SetPIDigitalStateSet = class inherit OSICmdletBase end
The SetPIDigitalStateSet type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| SetPIDigitalStateSet |
Properties
| Name | Description | |
|---|---|---|
| Connection | Connection to a PI Data Archive from which to set the PI Digital State Set | |
| Name | Name of the PI Digital State Set to set | |
| States | Digital states to apply to the existing PI Digital State Set The index of the state in the array of passed states is the integral representation of the state. Run "Get-Help Add-PIDigitalStateSet -Examples" for further explanation. |
Examples
Set-PIDigitalStateSet -Name "StamperStatus" -States "RUNNING","OFF" -Connection $con
Where:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
This example edits an existing digital state set "StamperStatus" on the "PISRV1" PI Data Archive. This states contained in the PI Digital State Set will be set with the following integral representations:
0="RUNNING" : 1="OFF"