Private/Get-IdracPriviledgeCode.ps1

Function Get-IdracPriviledgeCode{
    [OutputType([System.String])]
    [CmdletBinding()]
    Param (
        [Parameter(Mandatory = $true)]
        [ValidateSet("Administrator","Operator")]
        [string]$PriviledgeName
    )

    Write-Verbose -Message "Converting Role to Code ..."
    if ($PriviledgeName -eq "Administrator"){
        return "0x1ff"
    }
    elseif ($PriviledgeName -eq "Operator") {
        return "0x1f7"
    }
    else{
        return "0x000"
    }
}