Containers/Get-PlatformFromContainer.ps1
function Get-PlatformFromContainer { Param( [Parameter(Mandatory=$true)] [string]$ContainerName ) try { try { return [version](Get-BcContainerPlatformVersion -containerOrImageName $ContainerName) } catch { return (Get-AppKeyValue -KeyName 'platform') } } catch { return $null } } |