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

PI Powershell

SetAFSecurityIdentity Class

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

Sets an AF Security Identity on an AF Server

The Set-AFSecurityIdentity cmdlet edits an existing AF Security Identity on an AF Server. This cmdlet can be used to rename, or add a description to an existing AF Security Identity. To enable/disable an identity, see: Enable-AFSecurityIdentity and Disable-AFSecurityIdentity.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellSetAFSecurityIdentity

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

Syntax

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

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

The SetAFSecurityIdentity type exposes the following members.

Constructors

  NameDescription
Public method
SetAFSecurityIdentity

Properties

  NameDescription
Public property
AFSecurityIdentity

AF Security Identity to edit

Public property
CheckIn

Check in changes immediately

Public property
Description

Description to set on the AF Security Identity

Public property
NewName

New name to set on the AF Security Identity

Public property
PassThru

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

Examples

Set-AFSecurityIdentity -NewName "Rolling Operators" -Description "All plant floor operators for rolling operation" -CheckIn -AFSecurityIdentity $OldIdentity

Where:

$OldIdentity = Get-AFSecurityIdentity -Name "Floor Operators" -Refresh -AFServer (Get-AFServer -Name "PIAF1")

Edits an AF Security Identity "Floor Operators" on the AF Server "PIAF1" to have a new name "Rolling Operators" and an updated description. The change is checked in immediately.

Examples

$EditedIdentity = Set-AFSecurityIdentity -NewName "Rolling Operators" -Description "All plant floor operators for rolling operation" -CheckIn -PassThrough -AFSecurityIdentity $OldIdentity

Where:

$OldIdentity = Get-AFSecurityIdentity -Name "Floor Operators" -Refresh -AFServer (Get-AFServer -Name "PIAF1")

Edits an AF Security Identity "Floor Operators" on the AF Server "PIAF1" to have a new name "Rolling Operators" and an updated description. The change is checked in immediately. The edited security AF Security Identity is returned, and in this example is stored in $EditedIdentity.

See Also

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