In this post, we are going to see how to change the PowerShell colors. There are not many options when it comes to changing the PowerShell colors. We can see the available list of colors using the following instructions.
- List of Colors in Powershell.
- Set PowerShell Colors.
- Invoke-Command on Remote Computer PowerShell.
List of Colors in PowerShell:
We can use the below script for displaying the list of colors in PowerShell.
The output of the above script is shown in the image.
From this, it is clear that there are not many colors to choose from when it comes to change the PowerShell Shell properties.
We can assign different colors to different aspects of PowerShell.
Set PowerShell Colors:
Below is a list of variables that should be set in order to manipulate the PowerShell color scheme.
The colors of a specific property are set using the corresponding property.
We can modify the earlier script to check the different colors that might suit the background.
The script is given in above that can be used to apply different background colors for the
The output of the above script is given below.
We can modify the same script to set the error foreground and error background as shown below.
The output of the above script is given in the image. Now we can go ahead and change the error background color in the same way.
We learned about the different colors that are available in PowerShell. We can use those colors to modify the different properties of PowerShell. The different properties are accessed using the $host variable. We can change the foreground color, background color, error foreground color and more.
If you want to know more about windows and Powershell, stay tuned to TecKangaroo.