kentoh - Fotolia
Looking for something else?
In Windows 10, Microsoft included a long overdue update to the command-line console. It now provides new editing options and improved usability within familiar command-line environments.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
The improvements to the Windows 10 command-line console make it much easier to use programs such as Command Prompt and PowerShell, and you can enable the new features simply by configuring them within the console properties. Microsoft also added registry settings to support the new options, which makes it possible to toggle them on and off at the desktop or through centralized management. For anyone who uses console applications, the Windows 10 improvements are a welcome addition, and they make running commands a better experience all around.
The console updates are specific to the conhost.exe program included with the Windows operating system. Since Windows Vista, the console executable has provided the functionality that drives command-line tools, such as PowerShell or the Command Prompt utility (cmd.exe). In fact, the Command Prompt itself remains unchanged in Windows 10, but it supports all the new features offered through the console.
New editing options
Although the new Windows 10 command-line console features are available out of the box to Windows 10, you must enable them before you can begin to use them. The simplest way to do this is through your command-line utility's properties. For example, the following figure shows the Command Prompt properties, with the Options tab selected.
Notice the Use legacy console checkbox at the bottom of the tab. The checkbox is selected by default, which means the new console features are disabled. Notice also that several options are grayed out. These are the new console editing options. To make these and other features available, clear the checkbox.
The first of the new editing options is Enable Ctrl key shortcuts, which provides the ability to use basic shortcut combinations within the console, such as Ctrl + C to copy text and Ctrl + V to paste text. That said, the console still supports the use of Ctrl + C to issue a break command. If you highlight text, the shortcut copies the text to the clipboard. If no text is highlighted, the shortcut issues a break command.
You can extend the use of keyboard shortcuts even further by enabling the Extended text selection keys option, which makes it easier to select text within a command. For example, you can use Shift + Left Arrow to select text to the left of the cursor one character at a time, or use Shift + Up Arrow to select all text up to the preceding line.
There is also an Enable line wrapping selection option, which changes the way you can select multiline text. In the past, when you selected multiple lines, the console took a columnar approach, allowing vertical selections without taking text that ran multiple lines into account, as shown below.
Notice that the text selected between points A and B does not include the beginning or end of lines, even though this text wraps across multiple lines. At times, this might be what you want, but quite often what you really need is to capture all the text.
As the following figure shows, if the Enable line wrapping selection option is enabled, the Windows 10 command-line console treats multiline selections the same as you would find in a program such as Microsoft Word, with all the text selected between points A and B.
One other important new editing feature available to the console is the Filter clipboard contents on paste option. When enabled, the option filters out unsupported characters when you copy and paste from external sources. For instance, the feature will change em dashes to regular dashes, and curly quotes and apostrophes to their straight form.
The Windows 10 command-line console also adds a few other features that make it easier to use. For example, resizing the console is now much more intuitive. Before, the only way to change the layout settings was through the console properties. But now, you can drag the corner of the window to resize it, and the buffer and window sizes are adjusted automatically.
For example, suppose you're working with the Command Prompt utility and you start with the basic layout dimensions:
Now, suppose you drag one of the corners of the Command Prompt window to make it wider and higher. If you were to then view the layout properties, you would find that the buffer and windows sizes have been increased to match the new size.
You can return to the Layout tab of the console properties at any time to adjust the sizes more precisely, just like you could with the legacy console.
Another new feature on the Layout tab is the Wrap text output on resize option. In the past, if you were to resize the window to make it smaller, the lines of text would not change and you would have to scroll across the window to view all the data. But if the Wrap text output on resize option is enabled and you resize the window, the lines will automatically wrap, so you don't have to scroll across the window.
You can find another new Windows 10 command-line console feature on the Colors tab in the console properties. The console now supports the Opacity option, which lets you set the transparency of the console window.
You can set the opacity between 30% and 100%, but 100% is the default -- the lower the opacity, the higher the transparency. At 30%, you can make the window practically invisible.
Ten command-line tools to use in Windows 7
How to shut down PCs remotely with the command line
Command-line tools to see if you’ve been hacked
What is the command-line interface?
Accessing the Command Prompt in Windows Server 2012