Tip: Customize the Windows PowerShell Console

Follow Our Daily Tips

Twitter | Blog | RSS | Facebook

Windows PowerShell allows you to customize a number of properties—something you’ll definitely want to do if you spend much time working in the console. For example, you can add buffers so that text scrolled out of the viewing area is accessible. You can resize the console, change its fonts, and more. To access its properties, open Windows PowerShell and right-click the title bar at the top of the console window. Then select Properties from the menu. Here’s an overview of settings you can configure:

Options Tab Allows you to configure cursor size, display options, edit options, and command history. Select QuickEdit Mode if you want to use a single mouse click to paste copied text into the Windows PowerShell window. Clear QuickEdit Mode if you want to right-click and then select Paste to insert copied text. Clear Insert Mode to overwrite text as the default editing mode. Use the command history to configure how previously used commands are buffered in memory.

Font Tab Allows you to set the font size and face used by the Windows PowerShell prompt. Raster font sizes are set according to their pixel width and height. For example, the size 8 12 is 8 screen pixels wide and 12 screen pixels high. Other fonts are set by point size, such as 10-point Lucida Console. Interestingly, when you select a point size of n, the font will be n pixels high; therefore, a 10-point font is 10 screen pixels high. These fonts can be designated as a bold font type as well, which increases their screen pixel width.

Layout Tab Allows you to set the screen buffer size, window size, and window position. Size the buffer height so that you can easily scroll back through previous listings and script output. A good setting is in the range of 2,000 to 3,000. Size the window height so that you can view more of the Windows PowerShell window at one time. A good setting is 60 lines on screens set to 1280 1024 resolution with a 12-point font. If you want the PowerShell window to be in a specific screen position, clear Let System Position Window and then specify a position, in pixels, for the upper-left corner of the Windows PowerShell window by using Left and Top.

Colors Tab Allows you to set the text and background colors used by the Windows PowerShell console. Screen Text and Screen Background control the respective color settings for the window. The Popup Text and Popup Background options control the respective color settings for any pop-up dialog boxes generated when running commands at the Windows PowerShell prompt.

When you are finished updating the window properties, click OK to save your settings to your user profile. Your settings modify only the shortcut that started the current window. Any time you start Windows PowerShell using the applicable shortcut, Windows PowerShell will use these settings. If, however, you start Windows PowerShell using a different shortcut, you’ll have the settings associated with that shortcut.

From the Microsoft Press book Windows PowerShell 2.0 Administrator’s Pocket Consultant by William R. Stanek.

Looking for More Tips?

For more tips on using Microsoft products and technologies, visit the TechNet Magazine Tips library.