SetAFSecurityIdentity Class
- Last UpdatedDec 15, 2025
- 3 minute read
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
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellSetAFSecurityIdentity
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
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
| Name | Description | |
|---|---|---|
| SetAFSecurityIdentity |
Properties
| Name | Description | |
|---|---|---|
| AFSecurityIdentity | AF Security Identity to edit | |
| CheckIn | Check in changes immediately | |
| Description | Description to set on the AF Security Identity | |
| NewName | New name to set on the AF Security Identity | |
| 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.