SetAFSecurityMapping Class
- Last UpdatedDec 15, 2025
- 3 minute read
Set an AF Security Mapping on an AF Server
The Set-AFSecurityMapping cmdlet edits an existing AF Security Mapping on an AF Server. This cmdlet can be used to rename, change the description, or map the AF Security Mapping to a new AF Identity.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellSetAFSecurityMapping
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Set", "AFSecurityMapping", SupportsShouldProcess = true)] public class SetAFSecurityMapping : OSICmdletBase
<CmdletAttribute("Set", "AFSecurityMapping", SupportsShouldProcess := true)> Public Class SetAFSecurityMapping Inherits OSICmdletBase Dim instance As SetAFSecurityMapping
[CmdletAttribute(L"Set", L"AFSecurityMapping", SupportsShouldProcess = true)] public ref class SetAFSecurityMapping : public OSICmdletBase
[<CmdletAttribute("Set", "AFSecurityMapping", SupportsShouldProcess = true)>] type SetAFSecurityMapping = class inherit OSICmdletBase end
The SetAFSecurityMapping type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| SetAFSecurityMapping |
Properties
| Name | Description | |
|---|---|---|
| AFSecurityIdentity | AF Security Identity to set on the AF Security Mapping | |
| AFSecurityMapping | Existing AF Security Mapping to edit | |
| CheckIn | Check in changes immediately | |
| Description | Description to set on the AF Security Mapping | |
| NewName | New name to set on the AF Security Mapping | |
| PassThru | Returns objects that were changed. By default, this cmdlet does not generate any output |
Examples
Set-AFSecurityMapping -AFSecurityIdentity $Administrators -Description "TestUser now added as administrator" -CheckIn -AFSecurityMapping $TestUserWhere:
$TestUser = Get-AFSecurityMapping -Name "domain\testuser" -Refresh -AFServer (Get-AFServer -Name "PIAF1")
$Administrators = Get-AFSecurityIdentity -Name "Administrators" -Refresh -AFServer (Get-AFServer -Name "PIAF1")
This example edits the current mapping for "domain\testuser" and sets his AF Identity to give him "Administrators" permissions. The description is also updated to reflect this change. The change is checked in immediately.
Examples
Set-AFSecurityMapping -NewName "TestUser_Administrator" -CheckIn -AFSecurityMapping $TestUserWhere:
$TestUser = Get-AFSecurityMapping -Name "domain\testuser" -Refresh -AFServer (Get-AFServer -Name "PIAF1")
This example renames the mapping for "domain\testuser" on the "PIAF1" AF Server to "TestUser_Administrator". The change is checked in immediately.