How to Change PowerShell Color Scheme on Windows 10
The get-go ever Windows PowerShell was released over a decade ago for Windows XP, Windows Server 2003 and Windows Vista. It'southward been a constant role of all Windows editions since then, starting with Windows vii in 2009. While there have been many changes fabricated to the software itself, the one thing that has stayed unchanged over the years is the color scheme – a blue background with white/yellow text in general, and scarlet text on a blackness background for fault messages. While virtually people take gotten used to these colors, some of you may want something more distinctive, either for improve visibility or for aesthetic reasons. That existence the case, let's talk a look at how you tin can modify Windows PowerShell color scheme in Windows 10:
Annotation: Before we go on, it'south of import to understand that this particular tutorial will deal with the PowerShell console, and not the PowerShell ISE, which is i of the two host applications for Windows PowerShell engine and linguistic communication. It has it's own customization settings that demand to exist tackled separately, and is beyond the scope of this tutorial.
Alter Groundwork and Foreground Colors in Windows x PowerShell Console
- As mentioned earlier, Windows PowerShell console displays white on blueish by default and blood-red on blackness for fault messages, and then to alter colors, correct-click on the PowerShell Window top-bar, and select 'Backdrop'.
- In one case the Windows PowerShell 'Properties' box pops upwardly, click on the 'Colors' tab, and y'all'll get a whole host of choices to set background and foreground colors every bit seen in the screenshot beneath.
From hither, y'all can change text colors, popup text colors, groundwork colors and even set the opacity levels.
Change Fault Message Colors in Windows 10 PowerShell Console
- While this was a actually like shooting fish in a barrel fashion to alter some of the settings, what if you desire to practice more all-encompassing changes to your PowerShell console? For example, what if you desire to alter the text and groundwork colors of error messages from cherry-red on black to something a little less drastic? For that, you'll need to become downward and dirty and utilise the console itself rather than rely on GUI. First off, to know the default colors, go ahead and re-create/paste this code on the PowerShell console and press 'Enter':
$host.privatedata
- To change the foreground and background colors of error messages, all you need to do is assign new values. Since I'd like to change the background color to 'Magenta' and foreground colour to 'Green', I'll input the two commands below. Just remember to enter them separately and press 'Enter' in each instance.
$host.PrivateData.ErrorBackgroundColor = "Magenta"
$host.PrivateData.ErrorForegroundColor = "Green"
- You lot have now configured your console settings, but you'll need to save them to your profile settings so that the screen opens up exactly as you lot want it to, every time. For that, first run the command
$contour. This will evidence you the name (and location) of the default file for your profile.
- In reality, though, the default PowerShell configuration file does non fifty-fifty exist in virtually cases. So run the post-obit control to check if it already exists or if you demand to create it from scratch:
test-path $profile. If the file already exists, you'll get a "True" output, else, you'll get "Fake".
- As you tin meet from the above screenshot, I got the latter, then I'll need to create the file. If yous get "True", skip this footstep and go to the side by side. Else, enter the following command to create the file:
New-Particular -path $profile -type file -strength
- Once the file is created, yous tin can easily edit information technology with Notepad by using the
notepad $contourcommand in the Powershell Window. From there, you tin can add whatever configuration code y'all desire to using the commands discussed in a higher place. You can non merely alter colors, but as well fonts, windows size, etc through this method, but nosotros're only going to take a look at changing colors without complicating matters whatever farther.
$panel = $host.ui.rawui
$console.backgroundcolor = "black"
$console.foregroundcolor = "white"
$colors = $host.privatedata
$colors.verbosebackgroundcolor = "Magenta"
$colors.verboseforegroundcolor = "Green"
$colors.warningbackgroundcolor = "Red"
$colors.warningforegroundcolor = "white"
$colors.ErrorBackgroundColor = "DarkCyan"
$colors.ErrorForegroundColor = "Yellow"
set-location C:\
articulate-host
- We're well-nigh there, but in that location's one last stride. Run the following command to permit local scripts to run on your system:
Set up-ExecutionPolicy RemoteSignedand select "A" to allow all scripts. At present that you're done, this is how your PowerShell console would look every time you start information technology up. Even the errors messages would look a little less jarring than they normally do.
That's it, folks, I've made the Windows PowerShell console on my work laptop look almost exactly like the good old Command Prompt with just a dash of colour thrown in for fun.
Annotation: While the same steps are meant specifically for Windows 10, I also tried them out on our older Dell desktop running Windows 7. Every step is pretty much identical, and every thing worked as expected.
SEE ALSO: How to Stop Windows 10 Updates From Installing Automatically
Use Simple Commands To Alter Windows PowerShell Colors in Windows 10
The Windows PowerShell is a great tool for power users simply that doesn't mean it has to exist dull, drab and tiresome. Tweaking a few setting here and there can make a world of difference to how your PowerShell panel looks, then requite it a go and change the colors to whatsoever your heart feels similar. And once you do that, don't forget to give us a heads-up about how things went, because nosotros love hearing from you.
Source: https://beebom.com/how-change-powershell-color-scheme-windows-10/
Posted by: riveracamortautley.blogspot.com

0 Response to "How to Change PowerShell Color Scheme on Windows 10"
Post a Comment