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

PI Powershell

SetAFUnitOfMeasureClass Class

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

Set an AF Unit of Measure Class

The Set-AFUnitOfMeasureClass cmdlet will rename or add a description to an existing AF Unit of Measure Class on an AF Server.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellSetAFUnitOfMeasureClass

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

Syntax

[CmdletAttribute("Set", "AFUnitOfMeasureClass", DefaultParameterSetName = "FactorOffset", 
	SupportsShouldProcess = true)]
public class SetAFUnitOfMeasureClass : OSICmdletBase
<CmdletAttribute("Set", "AFUnitOfMeasureClass", DefaultParameterSetName := "FactorOffset", 
	SupportsShouldProcess := true)>
Public Class SetAFUnitOfMeasureClass
	Inherits OSICmdletBase

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

The SetAFUnitOfMeasureClass type exposes the following members.

Constructors

  NameDescription
Public method
SetAFUnitOfMeasureClass

Properties

  NameDescription
Public property
AFUnitOfMeasureClass

AFUnitOFMeasureClass to set

Public property
CheckIn

Check in changes immediately

Public property
Description

Description of the AF Unit of Measure Class to set

Public property
NewName

New name of the AF Unit of Measure Class to set

Public property
PassThru

Returns objects that were changed. By default, this cmdlet does not generate any output.

Examples

Set-UnitOfMeasureClass -NewName "MyChangedUOMClass" -CheckIn -AFUnitOfMeasureClass $afUOMClassToRename

Where:

$afServer = Get-AFServer -Name PIAF1

$afUOMClassToRename = Get-AFUnitOfMeasureClass -Name "MyUOMClass" -AFServer $afServer

This example renames an existing AF Unit of Measure Class "MyUOMClass" on AF Server "PIAF1" to "MyChangedUOMClass". The change is checked in immediately.

Examples

Add-AFUnitOfMeasureClass -Description "My Unit of Measure Class" -CheckIn -AFUnitOfMeasureClass $afUOMClass

Where:

$afServer = Get-AFServer -Name PIAF1

$afUOMClass = Get-AFUnitOfMeasureClass -Name "MyOUMClass" -AFServer $afServer

Set a description to the AF UOM Class "MyUOMClass" on the AF Server "PIAF1". The change is checked in immediately.

See Also

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