(view help text of airreggui as plain text)
NAME
AirRegGUI.ps1
SYNOPSIS
Search for aircraft photos on Airport-data.com by the aircraft's registration number
SYNTAX
D:\Sources\PowerShell\Aircraft Registries\AirRegGUI.ps1 [[-AircraftRegistration] <String>] [[-SearchEngine] <String>] [-Hide] [-Help] [-Version]
[<CommonParameters>]
DESCRIPTION
This simple GUI script allows you to enter an aircraft registration and then search Airport-data.com for photos and specifications of that
aircraft.
Interactive usage: enter an aircraft registration in the input texbox and press Enter or click the Search button to search Airport-data.com's
website for photos and detailed specifications.
Command line usage: run this script with -Help parameter to view its command line syntax.
PARAMETERS
-AircraftRegistration <String>
(optional) A valid aircraft registration, e.g. PH-PBY or N1944S or OK-NUL.
Aircraft registration may be entered in the GUI if not specified on the command line.
Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-SearchEngine <String>
(optional) Alternative search engine if no match was found on Airport-data.com.
Valid SearchEngine values are 'DuckDuckGo', 'Google' (default) or 'StartPage'.
Useful only if local database extension scripts are installed.
Command line only, cannot be changed interactively in the GUI.
Required? false
Position? 2
Default value Google
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Hide [<SwitchParameter>]
Hides the console window (GUI remains visible).
Command line only, cannot be changed interactively in the GUI.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Help [<SwitchParameter>]
Shows this script's help screen, with more details than the Help button's help text.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Version [<SwitchParameter>]
Show this script's version number.
If combined with -Verbose show full script path, version number and last/modified/release date.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Dashes are mandatory in many aircraft registrations, but not all, e.g. PH-PBY and N1944S will work, but PHPBY and N-1944S won't.
Invalid command line switches starting with a dash will trigger a PowerShell error message.
All command line switches starting with a slash will trigger this script's help screen.
This script can be extended by using downloaded local aircraft registration databases; see this script's web page (see links section) for
details.
Return code ("ErrorLevel") is 1 in case of errors, otherwise 0.
-------------------------- EXAMPLE 1 --------------------------
PS C:\>powershell . ./AirRegGUI.ps1
Will open the GUI with empty input textbox, the console remains visible
-------------------------- EXAMPLE 2 --------------------------
PS C:\>powershell . ./AirRegGUI.ps1 -Hide
Will open the GUI with empty input textbox and hide the console
-------------------------- EXAMPLE 3 --------------------------
PS C:\>powershell . ./AirRegGUI.ps1 N1944S
Will open the GUI with N1944S in input textbox, and start search immediately, the console remains visible
-------------------------- EXAMPLE 4 --------------------------
PS C:\>powershell . ./AirRegGUI.ps1 -AircraftRegistration N1944S
Will open the GUI with N1944S in input textbox, and start search immediately, the console remains visible
-------------------------- EXAMPLE 5 --------------------------
PS C:\>powershell . ./AirRegGUI.ps1 PH-PBY -Hide
Will open the GUI with PH-PBY in input textbox, start search immediately, and hide the console
-------------------------- EXAMPLE 6 --------------------------
PS C:\>powershell . ./AirRegGUI.ps1 -AircraftRegistration PH-PBY -Hide
Will open the GUI with PH-PBY in input textbox, start search immediately, and hide the console
RELATED LINKS
Script written by Rob van der Woude:
https://www.robvanderwoude.com/airreg.php
Airport-data API courtesy of Airport-data.com:
http://www.airport-data.com/api/doc.php
Script created in Visual Studio Community 2019 with a trial version of Ironman Software's PowerShell Pro Tools Suite:
https://ironmansoftware.com/powershell-pro-tools/
Capturing Enter key (as a work-around for the form's AcceptButton not working as expected) by sodawillow on StackOverflow.com:
https://stackoverflow.com/a/41441704
Code to hide console window by Anthony on StackOverflow.com:
http://stackoverflow.com/a/15079092
Use of Shown event (to make sure the GUI is visible before starting an optional immediate search) by Matthias Schippling on StackOverflow.com:
https://stackoverflow.com/a/219155
Capture -Debug and -Verbose parameter by mklement0 on StackOverflow.com:
https://stackoverflow.com/a/48643616
Embedded icon based on code by Theo on StackOverflow.com:
https://stackoverflow.com/a/53377253
Airplane icon image courtesy of Icons8.com:
https://icons8.com/
page last uploaded: 2025-10-23; loaded in 0.0051 seconds