<# .SYNOPSIS Search a downloaded New Zealand aircraft registry database for an New Zealand 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 New Zealand aircraft registry database (see links section), unZIP and move the file AircraftRegisterExport.tab to the 'ZK' folder. Now run this script with an New Zealand aircraft registration as its only parameter (see examples section). The script will first look for the word 'Aeroplane' in column 1 and the specified registration code in column 2 of the tab-delimited AircraftRegisterExport.tab file. If a match is found, the manufacturer and model are found in columns 3 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 './AirRegZKCmd.ps1' -Examples will show 2 examples of this script being called by another script. .PARAMETER Registration A valid NewZealand aircraft registration, e.g. ZK-ADI .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 . ./AirRegZKCmd.ps1 ZK-ADI Will return tab-delimited string "ZK-ADIDe HavillandDH 83 Fox Moth", and set variables $Manufacturer to "De Havilland" and $Model to "DH 83 Fox Moth" .EXAMPLE "ZK-ADI" | . ./AirRegZKCmd.ps1 Will also return tab-delimited string "ZK-ADIDe HavillandDH 83 Fox Moth", and set variables $Manufacturer to "De Havilland" and $Model to "DH 83 Fox Moth" .EXAMPLE . ./AirRegZKCmd.ps1 "ZK-ADI" -Debug This will return: Start searching "ADI" in AircraftRegisterExport.tab at