AddAFSecurityMapping Class
- Last UpdatedDec 15, 2025
- 4 minute read
Adds an AF Security Mapping to an AF Server
The Add-AFSecurityMapping cmdlet adds an AF Security Mapping to an AF Server.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellAddAFSecurityMapping
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Add", "AFSecurityMapping", SupportsShouldProcess = true)] public class AddAFSecurityMapping : OSICmdletBase
<CmdletAttribute("Add", "AFSecurityMapping", SupportsShouldProcess := true)> Public Class AddAFSecurityMapping Inherits OSICmdletBase Dim instance As AddAFSecurityMapping
[CmdletAttribute(L"Add", L"AFSecurityMapping", SupportsShouldProcess = true)] public ref class AddAFSecurityMapping : public OSICmdletBase
[<CmdletAttribute("Add", "AFSecurityMapping", SupportsShouldProcess = true)>] type AddAFSecurityMapping = class inherit OSICmdletBase end
The AddAFSecurityMapping type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| AddAFSecurityMapping |
Properties
| Name | Description | |
|---|---|---|
| Account | Account to add to the AF Security Mapping. The parameter can be provided as a string, for example: "domain\user" | |
| AFSecurityIdentity | AF Security Identity to apply to the new AF Security Mapping | |
| AFServer | AF Server for which to add the AF Security Mapping | |
| CheckIn | Check in changes immediately | |
| Description | Description for the new AF Security Mapping | |
| MappingType | Mapping type to use for the AF Security Mapping. | |
| Name | Name of the AF Security Mapping to add | |
| RemoteMachineName | The name of the remote machine to be used as context for resolving the Windows Account | |
| WindowsAccount | Windows Account to add to the AF Security Mapping. The parameter can be provided as a string, for example: "domain\user" |
Examples
Add-AFSecurityMapping -Name TestUserMapping -WindowsAccount "domain\testuser" -AFSecurityIdentity $Engineers -CheckIn -AFServer (Get-AFServer -Name "PIAF1")
Where:
$Engineers = Get-AFSecurityIdentity -Name "Engineers" -Refresh -AFServer (Get-AFServer -Name "PIAF1")
Creates a new AF Security Mapping for the Windows Account "domain\testuser" called "TestUserMapping" and maps him/her to the Engineers AF Security Identity on the AF Server "PIAF1"
Examples
Add-AFSecurityMapping -Name PIAdministrator -WindowsAccount "domain\adminaccount" -AFSecurityIdentity $Administrators -CheckIn -AFServer (Get-AFServer -Name PIAF1)Where:
$Administrators = Get-AFSecurityIdentity -Name "Administrators" -Refresh -AFServer (Get-AFServer -Name "PIAF1")
Creates a new AF Security Mapping for the Windows Account "domain\adminaccount" called "PIAdministrator" and maps him/her to the Administrators AF Security Identity on the AF Server "PIAF1"
Examples
Add-AFSecurityMapping -Name RoleMapping -Account "domain/name" -MappingType Role -AFSecurityIdentity $Engineers -CheckIn -AFServer (Get-AFServer -Name PIAF1)Where:
$Engineers = Get-AFSecurityIdentity -Name "Engineers" -Refresh -AFServer (Get-AFServer -Name "PIAF1")
Creates a new AF Security Mapping for the role "domain/name" called "RoleMapping" and maps it to the Engineers AF Security Identity on the AF Server "PIAF1"
Examples
Add-AFSecurityMapping -Name ClientMapping -Account "clientid" -MappingType ClientCredential -AFSecurityIdentity $Engineers -CheckIn -AFServer (Get-AFServer -Name PIAF1)Where:
$Engineers = Get-AFSecurityIdentity -Name "Engineers" -Refresh -AFServer (Get-AFServer -Name "PIAF1")
Creates a new AF Security Mapping for the client "clientid" called "ClientMapping" and maps it to the Engineers AF Security Identity on the AF Server "PIAF1"