RemovePIDigitalStateFromStateSet Class
- Last UpdatedDec 15, 2025
- 3 minute read
Remove a PI Digital State from a PI Digital State Set
The Remove-PIDigitalStateFromStateSet cmdlet removes a PI Digital State from a PI Digital State Set on a PI Data Archive.
The connection parameter specifies which connection to a PI Data Archive to use.
It is important to note that when removing a PI Digital State from a PI Digital State Set, the indices of the following states will be decremented by 1. For example: a Digital State Set "BoilerState" contains the following states
0="ON" : 1="OFF" : 2="STARTUP" : 3="COOLDOWN"
If the "OFF" state is removed, then the integral representations of "STARTUP" and "COOLDOWN" states will be decremented to 1 and 2, respectively. For example:
0="ON" : 1="STARTUP" : 2="COOLDOWN"
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellOSICmdletBaseWithConnection
OSIsoft.PowerShellRemovePIDigitalStateFromStateSet
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Remove", "PIDigitalStateFromStateSet", SupportsShouldProcess = true)] public class RemovePIDigitalStateFromStateSet : OSICmdletBaseWithConnection
<CmdletAttribute("Remove", "PIDigitalStateFromStateSet", SupportsShouldProcess := true)> Public Class RemovePIDigitalStateFromStateSet Inherits OSICmdletBaseWithConnection Dim instance As RemovePIDigitalStateFromStateSet
[CmdletAttribute(L"Remove", L"PIDigitalStateFromStateSet", SupportsShouldProcess = true)] public ref class RemovePIDigitalStateFromStateSet : public OSICmdletBaseWithConnection
[<CmdletAttribute("Remove", "PIDigitalStateFromStateSet", SupportsShouldProcess = true)>] type RemovePIDigitalStateFromStateSet = class inherit OSICmdletBaseWithConnection end
The RemovePIDigitalStateFromStateSet type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| RemovePIDigitalStateFromStateSet |
Properties
| Name | Description | |
|---|---|---|
| Connection | Connection to a PI Data Archive from which to remove the PI Digital State from the PI Digital State Set | |
| Name | Name of the PI Digital State Set from which to remove the PI Digital State | |
| StateId | State ID of the PI Digital State to remove | |
| StateName | State name of the PI Digital State to remove |
Examples
Remove-PIDigitalStateFromStateSet -StateName "OFF" -Name "BoilerState" -Connection $con
Where:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
This example removes the digital state "OFF" from the PI Digital State Set "BoilerState" on the "PISRV1" PI Data Archive. If the original PI Digital State Set configuration was as follows:
0="ON" : 1="OFF" : 2="STARTUP" : 3="COOLDOWN"
Then after running this example, the "BoilerState" PI Digital State Set would now look like the following:
0="ON" : 1="STARTUP" : 2="COOLDOWN"