SetAFUnitOfMeasure Class
- Last UpdatedDec 15, 2025
- 4 minute read
Set an AF Unit of Measure
The Set-AFUnitOfMeasure cmdlet edits an existing AF Unit of Measure on an AF Server.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellSetAFUnitOfMeasure
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Set", "AFUnitOfMeasure", DefaultParameterSetName = "FactorOffset", SupportsShouldProcess = true)] public class SetAFUnitOfMeasure : OSICmdletBase
<CmdletAttribute("Set", "AFUnitOfMeasure", DefaultParameterSetName := "FactorOffset", SupportsShouldProcess := true)> Public Class SetAFUnitOfMeasure Inherits OSICmdletBase Dim instance As SetAFUnitOfMeasure
[CmdletAttribute(L"Set", L"AFUnitOfMeasure", DefaultParameterSetName = L"FactorOffset", SupportsShouldProcess = true)] public ref class SetAFUnitOfMeasure : public OSICmdletBase
[<CmdletAttribute("Set", "AFUnitOfMeasure", DefaultParameterSetName = "FactorOffset", SupportsShouldProcess = true)>] type SetAFUnitOfMeasure = class inherit OSICmdletBase end
The SetAFUnitOfMeasure type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| SetAFUnitOfMeasure |
Properties
| Name | Description | |
|---|---|---|
| Abbreviation | Abbreviation of the AF Unit of Measure to set. This can be an SI abbreviation or custom abbreviation | |
| AFUnitOfMeasure | AF Unit of Measurement to set | |
| CheckIn | Check in changes immediately | |
| Description | Description of the AF Unit of Measure to set | |
| FromFormula | Formula used to convert AF UOM to reference UOM Note that formula UOMs have limitations as well as a performance impact. Simply UOMs with reference factors and reference offsets should be used instead whenever possible. | |
| NewName | New name for the AF Unit of Measure to be set | |
| PassThru | Returns objects that were changed. By default, this cmdlet does not generate any output. | |
| ReferenceFactor | Reference factor for the AF Unit of Measure to set | |
| ReferenceOffset | Reference offset for the AF Unit of Measure to set | |
| ReferenceUnitOfMeasure | Reference Unit of Measure used to define the UOM to set | |
| ToFormula | Formula used to convert reference AF UOM to AF UOM to set Note that formula UOMs have limitations as well as performance impact. Simple UOMs with reference factors and reference offsets should be used instead whenever possible. |
Examples
Set-AFUnitOfMeasure -Description "Decimeter is an SI unit of length representing 0.1 meters" -AFUnitOfMeasure $refUOM -CheckIn -AFServer $afServerWhere:
$afServer = Get-AFServer -Name PIAF1
$afUOM = Get-AFUnitOfMeasure -Name "decimeter" -AFServer $afServer
Edits the AF UOM "decimeter" by adding a description. The change is checked in immediately.
Examples
Set-AFUnitOfMeasure -NewName "decimetre" -AFUnitOfMeasure $afUOM -CheckIn -AFServer $afServerWhere:
$afServer = Get-AFServer -Name PIAF1
$refUOM = Get-AFUnitOfMeasure -Name "decimeter" -AFServer $afServer
Renames an existing AF UOM "decimeter" to "decimetre". The change is checked in immediately.