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

PI Powershell

GetAFUnitOfMeasure Class

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

Get an AF Unit of Measure

The Get-AFUnitOfMeasure cmdlet gets an existing AF Unit of Measure from an AF Server.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellGetAFUnitOfMeasure

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)

Syntax

[CmdletAttribute("Get", "AFUnitOfMeasure", DefaultParameterSetName = "Name", 
	SupportsShouldProcess = true)]
public class GetAFUnitOfMeasure : OSICmdletBase
<CmdletAttribute("Get", "AFUnitOfMeasure", DefaultParameterSetName := "Name", 
	SupportsShouldProcess := true)>
Public Class GetAFUnitOfMeasure
	Inherits OSICmdletBase

Dim instance As GetAFUnitOfMeasure
[CmdletAttribute(L"Get", L"AFUnitOfMeasure", DefaultParameterSetName = L"Name", 
	SupportsShouldProcess = true)]
public ref class GetAFUnitOfMeasure : public OSICmdletBase
[<CmdletAttribute("Get", "AFUnitOfMeasure", DefaultParameterSetName = "Name", 
	SupportsShouldProcess = true)>]
type GetAFUnitOfMeasure =  
    class
        inherit OSICmdletBase
    end

The GetAFUnitOfMeasure type exposes the following members.

Constructors

  NameDescription
Public method
GetAFUnitOfMeasure

Properties

  NameDescription
Public property
AFServer

AF Server from which to get the AF Unit of Measure

Public property
ID

ID of the AF Unit of Measure to get

Public property
Index

Index of the AF Category to get

Public property
Name

Name of the AF Unit of Measure to get. Wildcards are accepted.

Public property
Refresh

Refresh container before accessing

Examples

Get-AFUnitOfMeasure -Name "Meter" -AFServer $afServer

Where:

$afServer = Get-AFServer -Name PIAF1

Gets the existing AF Unit of Measure "Meter" from the AF Server "PIAF1".

Examples

Get-UnitOfMeasure -Name "Degree*" -AFServer $afServer

Where:

$afServer = Get-AFServer -Name PIAF1

Gets all AF Units of Measure matching the name "Degree*", for example: degree fahrenheit, degree celsius, etc on AF Server "PIAF1".

Examples

Get-UnitOfMeasure -Name "*" -AFServer $afServer

Where:

$afServer = Get-AFServer -Name PIAF1

Gets all AF Units of Measure on AF Server "PIAF1".

See Also

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