Testing/Get-ContainerCompanyToTest.ps1
function Get-ContainerCompanyToTest { param( # Container to use [Parameter(Mandatory=$false)] [string] $ContainerName = (Get-ContainerFromLaunchJson) ) $Companies = Get-CompanyInNavContainer $ContainerName | Where-Object {$_ -isnot [System.String]} # there is a blank company in the Danish database - don't ask, I don't know if ((Get-NavContainerCountry $ContainerName) -eq 'dk') { $CompanyName = $Companies.Item(1).CompanyName } else { if ($null -eq $Companies.Count) { $CompanyName = $Companies.CompanyName } else { $CompanyName = $Companies.Item(0).CompanyName } } $CompanyName } Export-ModuleMember -Function Get-ContainerCompanyToTest |