public/library/Get-PSTSVariablesGroup.ps1

function Get-PSTSVariablesGroup
{
    param(
       [Parameter(Mandatory=$true)] [string] $project

    )

    process {

        $content = `
        _PSTSAPI `
            -project $project `
            -resource "distributedtask/VariableGroups" `
            -method "GET"

        return [VariableGroup[]]$content.value


    }
}