<# .SYNOPSIS Search a downloaded FAA aircraft registration database for an aircraft registation and if found, return the aircraft manufacturer and model (tab-delimited) .DESCRIPTION First, create a subdirectory 'N' in this script's parent folder. Next, download the FAA Aircraft Registry's Releasable Aircraft Database (see links section), unzip it and move the files MASTER.txt and ACFTREF.txt (and optionally the other files as well) to the 'N' folder. Now run this script with an aircraft registration as its only parameter (see examples section). The script will first look up the MfgrModelCode for the specified registration code in the MASTER.txt file. With the MfgrModelCode the script will look up the manufacturer and aircraf model in the ACFTREG.txt file. If a match is found, 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 './AirRegNCmd.ps1' -Examples will show 2 examples of this script being called by another script. The script contains a "second" script in a comment block, showing the "official' way to deal with the database's CSV files; however, the method used, regular expressions on plain text files, is about 4 times faster. .PARAMETER Registration A valid FAA aircraft registration, i.e. Nxxxxx (where x is a single alphanumeric character/digit) .PARAMETER Quiet Ignore all errors and do not display any error messages; in case of errors, just terminate with return code 1. .PARAMETER Help Show the script's help screen .PARAMETER Debug Show some progress messages .OUTPUTS A tab-delimited string and manufacturer and model are also stored in output variables $Manufacturer and $Model. .EXAMPLE . ./AirRegNCmd.ps1 "N1944S" Will return tab-delimited string "N1944SBOEINGE75", and set variables $Manufacturer to "BOEING" and $Model to "E75" .EXAMPLE "N1944S" | . ./AirRegNCmd.ps1 Will also return tab-delimited string "N1944SBOEINGE75", and set variables $Manufacturer to "BOEING" and $Model to "E75" .EXAMPLE . ./AirRegNCmd.ps1 "N9ZX" -Debug This will return: Start searching 9ZX in MASTER file at