Created
January 11, 2015 02:36
-
-
Save rkeithhill/7a5305d67567effde9d3 to your computer and use it in GitHub Desktop.
Resets the console background and foreground colors to their startup values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Certains console exes have a tendency to bork the console colors - looking at you | |
# MSBuild.exe. Either copy/paste this into your profile.ps1 file or dot source it. | |
$script:origBgColor = $host.ui.rawui.BackgroundColor | |
$script:origFgColor = $host.ui.rawui.ForegroundColor | |
function Reset-Colors | |
{ | |
$host.ui.rawui.BackgroundColor = $origBgColor | |
$host.ui.rawui.ForegroundColor = $origFgColor | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment