lib/poshy-env-var.0.5.25/lib/poshy-lucidity.0.3.16/src/Test-Elevation.ps1

#!/usr/bin/env pwsh
$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest


<#
.SYNOPSIS
    Tests whether or not the current session is elevated.
.OUTPUTS
    System.Boolean
#>

function Test-Elevation() {
    return [bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-32-544")
}