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

PI Powershell

RemoveAFSecurity Class

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

Remove an AF Security Identity from an AF object

The Remove-AFSecurity cmdlet removes an AF Security Identity from an AF object. The Security Identity can be removed from a single AF Object, or all child objects as well.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellRemoveAFSecurity

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

Syntax

[CmdletAttribute("Remove", "AFSecurity", SupportsShouldProcess = true)]
public class RemoveAFSecurity : OSICmdletBase
<CmdletAttribute("Remove", "AFSecurity", SupportsShouldProcess := true)>
Public Class RemoveAFSecurity
	Inherits OSICmdletBase

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

The RemoveAFSecurity type exposes the following members.

Constructors

  NameDescription
Public method
RemoveAFSecurity

Properties

  NameDescription
Public property
AFSecurityIdentity

The AF Security Identity to remove from the AF Object

Public property
AFServer

The AF Server for which to remove AF Security

Public property
ApplyTo

The AF Object for which to remove the AF Security Identity

Public property
ApplyToChildren

Remove the AF Security Identity from all the AF Objects child objects

Examples

Remove-AFSecurity -AFSecurityIdentity $afIdentity -ApplyTo $afDB -AFServer (Get-AFServer -Name PIAF1)

Where:

$afIdentity = Get-AFSecurityIdentity -Name Engineers -AFServer (Get-AFServer -Name PIAF1)

$afDB = Get-AFDatabase "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1")

Removes the AF Security Identity "Engineers" from the AF Database "AFDatabase1" on the AF Server "PIAF1".

Examples

Remove-AFSecurity -AFSecurityIdentity $afIdentity -ApplyTo $afElement -ApplyToChildren -AFServer (Get-AFServer -Name PIAF1)

Where:

$afIdentity = Get-AFSecurityIdentity -Name Engineers -AFServer (Get-AFServer -Name PIAF1)

$afElement = Get-AFElement -Name "Production Line 1" -AFDatabase (Get-AFDatabase -Name "AFDatabase1" -AFServer (Get-AFServer -Name "PIAF1"))

Removes the AF Security Identity "Engineers" from the AF Element "Production Line 1" on the AF Database "AFDatabase1" on the AF Server "PIAF1". The Identity is also removed from all child elements of "Production Line 1".

See Also

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