RemoveAFSecurity Class
- Last UpdatedDec 15, 2025
- 3 minute read
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
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
| Name | Description | |
|---|---|---|
| RemoveAFSecurity |
Properties
| Name | Description | |
|---|---|---|
| AFSecurityIdentity | The AF Security Identity to remove from the AF Object | |
| AFServer | The AF Server for which to remove AF Security | |
| ApplyTo | The AF Object for which to remove the AF Security Identity | |
| 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".