internal/functions/Get-PolicyResourceProperties.ps1

function Get-PolicyResourceProperties {
    [CmdletBinding()]
    param (
        $policyResource
    )

    if ($policyResource.properties) {
        return $policyResource.properties
    }
    else {
        return $policyResource
    }
}