Public/Get-UniverseUrl.ps1
|
function Get-UniverseUrl { [OutputType([string])] [CmdletBinding()] param( [Parameter(Mandatory = $false)] [string] $Path = "" ) Process { if($null -eq $Script:FQDN) { throw "Not connected to Fortytwo Universe. Please run Connect-Universe first." } $Path = [string]::IsNullOrEmpty($Path) ? "" : $Path.TrimStart('/') return "https://$Script:FQDN/$Path" } } |