Public/Start-P1WebManager.ps1

function Start-P1WebManager {
    <#
    .Synopsis
    Start PlannerOne web manager.
 
    .Description
    Start PlannerOne web manager in the default web browser.
 
    .Parameter Tenant
    The target tenant.
 
    .Example
    # Start PlannerOne web manager for tenant named Prod.
    Start-P1WebManager -Tenant Prod
    #>

    [cmdletbinding()]
    param( 
        [Parameter(Mandatory=$true)]
        [string] $Tenant
    )
    Process
    {
        if (!(Test-Tenant $Tenant)) {
            Write-Warning "Tenant $Tenant does not exist."
            Write-Warning "Operation canceled."
            return;
        }

        $info = Get-P1Tenant $Tenant
        $host = $info.WebHost
        $port = $info.SitePort
        $app = $info.WebApplicationName
        $url = "http://" + $host + ":" + $port + "/" + $app + "/configure"
        Write-Verbose "Opening $url"
        [Diagnostics.Process]::Start($url) | Out-Null
    }    
}