Public/Get-ALRulesetRule.ps1

<#
.SYNOPSIS
Retrieves rules from the given paths
#>

function Get-ALRulesetRule
{
    param
    (
        [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [Alias("FullName")]
        [string[]]$Path
    )

    process
    {
        $Path
        | ForEach-Object {
            $CurrentPath = $_

            Get-Content -Path $CurrentPath -Raw
            | ConvertFrom-Json
            | Select-Object -ExpandProperty rules
            | ForEach-Object { $_ | Add-Member -NotePropertyName Path -NotePropertyValue ($PSCmdlet.GetUnresolvedProviderPathFromPSPath($CurrentPath)) -PassThru }
        }
    }
}