<# .SYNOPSIS Search the downloaded OpenSky Network aircraft registration database for an aircraft registation and if found, return the aircraft manufacturer and model (tab-delimited) .DESCRIPTION First create a subdirectory 'OpenSkyNetwork' in this script's parent directory. Next download the OpenSky Network aircraft registration database (see links section), we will be using aircraft-database-complete-{year}-{month}.csv only for this script. Run this script with an aircraft registration as its only parameter (see examples section). The script will try to find the registration in the downloaded aircraft registry. If a match is found, the script will display a tab-delimited string with the registration and the manufacturer/model (). If the script was started by another PowerShell script with the -NoBreak switch, the calling PowerShell script may also read the manufacturer/model from the variable $Manufacturer, passed on by this script. If the script was started by a batch file, the calling batch file can use 'FOR /F' on this PowerShell script's screen output to find the manufacturer/model. Get-Help './AirRegOpenSkyCmd.ps1' -Examples will show 2 examples of this script being called by another script. .PARAMETER Registration A valid aircraft registration, e.g. N1944S, OK-NUL or OO-CAT .PARAMETER Quiet Ignore all errors and do not display any error messages; in case of errors, just terminate with return code 1 .PARAMETER NoBreak Do not break the search loop after a match is found. On average searches take about twice as long when using this switch; hence it is recommended to use it only if: -*- this script is called by another PowerShell script and: -*- the calling PowerShell script uses the variables $Manufacturer and $Model set by this script .PARAMETER Help Show the script's help screen .PARAMETER Version Show this script's version number; if combined with -Verbose show full script path, version number and last/modified/release date .PARAMETER Debug Show some progress messages; implies -NoBreak .OUTPUTS If a match is found: a tab-delimited string with , and if -NoBreak switch is used: variables $Manufacturer set to aircraft manufacturer $Model set to aircraft model If no match is found: False .EXAMPLE . ./AirRegOpenSkyCmd.ps1 "OO-CAT" Will return tab-delimited string "OO-CATAmateur BuiltJodel D.112" .EXAMPLE "OO-CAT" | . ./AirRegOpenSkyCmd.ps1 -NoBreak Will return tab-delimited string "OO-CATAmateur BuiltJodel D.112" and set variables $Manufacturer to "Amateur Built" and $Model to "Jodel D.112" .EXAMPLE . ./AirRegOpenSkyCmd.ps1 -Version -Verbose Will return the full script path, version and last modified/release date .EXAMPLE . ./AirRegOpenSkyCmd.ps1 -Version Will return the script version .EXAMPLE . ./AirRegOpenSkyCmd.ps1 OO-CAT -Debug Will return: Started searching for OO-CAT in ".\OpenSkyNetwork\aircraftDatabase.csv" at