Public/Get-P1Packages.ps1

function Get-P1Packages {
    <#
    .Synopsis
    Get all required packages from PlannerOne NuGet server.
 
    .Description
    Connect to remote repository and get the latest release.
    #>

    [cmdletbinding()]
    param( 
    )    
    Process {
        Write-Section "Reading PlannerOne package from repository..."
        $feedUrl = Get-FeedUrl
        if ($feedUrl -eq "") {
            return
        }

        if (Get-Command Find-Package -errorAction SilentlyContinue)
        {
            Write-Verbose "Find-Package exists"
            Find-Package -Source $feedUrl
        } else {
            Write-Output "Find-Package doesn't exist, using NuGet"
            NuGet list -Source $feedUrl
        }
    }
}