Script-based authorization
Example script
function Get-AuthorizationResponse {
param(
$User,
$Computer
)
Write-Information "We're in PowerShell!"
Write-Information "Checking if $($User.MsDsPrincipalName) is allowed access to $($Computer.MsDsPrincipalName)"
# Create an object to hold our authorization decisions
# Set IsAllowed to true to allow access, or set IsDenied to explicitly deny access, or leave both as false if no decision was made. This will allow other rules to be evaluated.
$Response = [PSCustomObject]@{
IsLocalAdminPasswordAllowed = $false
IsLocalAdminPasswordDenied = $false
IsLocalAdminPasswordHistoryAllowed = $false
IsLocalAdminPasswordHistoryDenied = $false
IsJitAllowed = $false
IsJitDenied = $false
IsBitLockerAllowed = $false
IsBitLockerDenied = $false
IsRapidLapsLoginAllowed = $false
IsRapidLapsLoginDenied = $false
IsRapidLapsElevationAllowed = $false
IsRapidLapsElevationDenied = $false
}
# Return the authorization response to Access Manager to process
Write-Output $Response;
}Logging information
Performance
$user object
$user objectProperty Name
Type
Description
$computer object
$computer objectProperty Name
Type
Description
Property Name
Type
Description
PreviousRecovering from a lost encryption certificateNextCustomized auditing with PowerShell notification channels
Last updated
Was this helpful?