<# .SYNOPSIS Search a downloaded Australian aircraft registry database for an Australian aircraft registation and if found, return the aircraft manufacturer and model (tab-delimited) .DESCRIPTION First, create a subdirectory 'VH' in this script's parent folder. Next, download the Australian aircraft registry database (see links section), unZIP and move the file acrftreg.csv to the 'VH' folder. Now run this script with an Australian aircraft registration as its only parameter (see examples section). The script will first look for the specified registration code in column 1 of the acrftreg.csv file. If a match is found, the manufacturer and model are found in columns 2 and 4. The script will display a tab-delimited string with the registration, the manufacturer and the aircraft model (). If the script was started by another PowerShell script, the calling PowerShell script may also read the manufacturer and model from the variables $Manufacturer and $Model, 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 and model. Get-Help './AirRegVHCmd.ps1' -Examples will show 2 examples of this script being called by another script. .PARAMETER Registration A valid Australian aircraft registration, e.g. VH-EYV .PARAMETER Quiet Ignore all errors and do not display any error messages; in case of errors, just terminate with return code 1. .PARAMETER Version Show this script's version number; if combined with -Verbose show full script path, version number and last/modified/release date .PARAMETER CheckDB If the required local database can be found, returns True and exit code 0; if not, returns False and exit code 1. .PARAMETER Help Show the script's help screen .PARAMETER Debug Show some progress messages .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 . ./AirRegVHCmd.ps1 VH-EYV Will return tab-delimited string "VH-EYVTHE BOEING COMPANYA75N1", and set variables $Manufacturer to "THE BOEING COMPANY" and $Model to "A75N1" .EXAMPLE "VH-EYV" | . ./AirRegVHCmd.ps1 Will also return tab-delimited string "VH-EYVTHE BOEING COMPANYA75N1", and set variables $Manufacturer to "THE BOEING COMPANY" and $Model to "A75N1" .EXAMPLE . ./AirRegVHCmd.ps1 "VH-EYV" -Debug This will return: Start searching "EYV" in acrftreg.csv file at