This entry-level training video, featuring 12 videos, is by SPOTO trainer Trevor Sullivan. Trevor Sullivan explains the basic concepts behind building terminal-based PowerShell applications.
This is the new PowerShell training.
This video skill will teach you how to create your own terminal UI apps using PowerShell code. These concepts can be combined to create utilities that meet your specific needs.
Take a look at Out-ConsoleGridView, a Microsoft terminal UI command.
Move the terminal cursor using the PowerShell host interface
Use Unicode box characters to draw UI elements
To aid in visual navigation, add emojis/icons to the terminal.
Colorize text output using ANSI escape sequences
Use keyboard controls to control your application
Understanding the event loop for terminal user interfaces
To speed up your development workflow, you can write helper functions
Check out this Docker container management application I created for demonstration purposes.
This training includes:
12 videos
1.5 hours of training
You can watch a video from the series here:
Why are Terminal UIs useful?
Terminal user interfaces can be useful tools because they can be used remotely from servers that don’t have Graphical User Interfaces.
Let’s take, for example, a group of servers running in the Amazon Web Services cloud. These servers do not have a desktop environment such as Gnome, KDE or KDE installed. Remote access to these servers can be done via Secure Shell (SSH). You can then run text-based apps within the SSH session. Text-based user interfaces are much more efficient than GUIs because they use very little data. They also perform well over low-bandwidth connections.
You can disconnect from your session to come back later. To do this, you can use a terminal multiplexer such as tmux to keep those applications running in background.
What are some examples of terminal UIs?
Terminal UIs can theoretically be used for many different applications. These ideas will help you get started on your project.
Manage cloud resources using Amazon Web Services (AWS), or Microsoft Azure
Docker containers that are running locally can be viewed and destroyed
Monitor and filter network traffic using UDP port or TCP port, or source-destination IP
Monitor system resources like CPU, memory, disk, and network
Many utilities are now implemented as terminal user interfaces instead of GUIs. Check out these open-source utilities.
Glances – A Python-based utility that monitors local system resources
Dry – A TUI to manage Docker containers and Docker Swarm clusters
termshark – Monitor network traffic from the commandline (like Wireshark!)
You can find more examples at the awesome-tuis repository.
Learn PowerShell now!
Download
Are you not a SPOTO subscriber yet? Start your week-long free trial now.
SPOTO offers everything you need to improve your IT skills and advance in your career: unlimited video training and Practice exams, Virtual Labs and validated learning with in–video Quizzes, Accountability coaching, and access to our exclusive IT professionals community.