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

PI Powershell

SetID Class

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

Changes the ID for the PISystem to the specified Guid.

This method will change the ID for the PISystem to the specified Guid. If the new ID is not specified, then a new Guid will be allocated and returned from the method call. For an AFCollective, this method will set the ID of the currently connected AFCollectiveMember.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellSetID

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

Syntax

[CmdletAttribute("Set", "AFServerID", SupportsShouldProcess = true)]
public class SetID : OSICmdletBase
<CmdletAttribute("Set", "AFServerID", SupportsShouldProcess := true)>
Public Class SetID
	Inherits OSICmdletBase

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

The SetID type exposes the following members.

Constructors

  NameDescription
Public method
SetID

Properties

  NameDescription
Public property
AFServer

Instance of the AFServer

Public property
ID

New ID (Guid)

Examples

$afServer | Set-AFServerID

Where:

$afServer = Get-AFServer -Name "AFServerMachineName"

Changes the ID for the PISystem by creating a new Guid.

Examples

$afServer | Set-AFServerID -ID $newID

Where:

$afServer = Get-AFServer -Name "AFServerMachineName"

$newID = New-Guid

Changes the ID for the PISystem to the specified $newID.

See Also

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