Exchange Shell Colors
You may have noticed that the output of the Write-Verbose - and possibly the color of other "Write-" commands - may change when using standard powershell, exchange shell or other flavors of powershell compared to the Powershell ISE.
I'm a very big fan of ISE so I wanted to change the colors in order to match the ones in ISE.
You can see the colors that are configured on your powershell window using the command
You'll get something like this
Now that we have a way to see the colors that are configured, what about a way to change them?
First, we'll save the output of the above command to a variable:
We are now able to update the color we want by just setting the proper property of the variable:
Put that in your $profile file and you won't have to worry about colors again!
I'm a very big fan of ISE so I wanted to change the colors in order to match the ones in ISE.
You can see the colors that are configured on your powershell window using the command
(Get-Host).PrivateData
You'll get something like this
Now that we have a way to see the colors that are configured, what about a way to change them?
First, we'll save the output of the above command to a variable:
$colors = (Get-Host).PrivateData
We are now able to update the color we want by just setting the proper property of the variable:
$colors.VerboseForegroundColor = "Cyan"
Put that in your $profile file and you won't have to worry about colors again!