With the introduction of PowerShell as a modern replacement for the good old CMD, it became quickly the standard command line for Windows based systems . These days PowerShell commands Windows Server, Databases and even the Cloud. However, it still looks like the good old MsDos console from Windows 95.
In order to give the default PowerShell console some charm I created a little helper tool that allows to set the transparency of a Window. Actually it sets transparency for all Windows of a given process name. My little tool WinStyler uses the Win32 API to modify styling of existing Windows. Are you surprised that Windows allows transparent Windows? Don’t be. It had the ability since Windows 2000 but was never exposed to the end user. In order to modify a Window, we have to specify the process name and the new alpha value for the Window. In the case of PowerShell the call is WinStyler –p PowerShell –a 200. Values between 1 and 255 are valid as alpha value. This also works for other programs. E.g. cmd.exe
And this is what PowerShell looks like on top of a nice Desktop Wallpaper.
If you like it more minimalistic then call WinStyler with parameter –n (WinStyler -p PowerShell -n). This will remove the Border and Caption. While that looks pretty nice, you will loose the ability to resize the Windows and to call the Property Window. You can restore the chrome with the parameter –r (WinStyler -p PowerShell -r). Unfortunately it also causes some artefacts while scrolling.
PowerShell Profile Integration
If you like the transparent PowerShell Windows and want them to look like that by default then you can call WinStyler via your PowerShell profile. If a folder called WindowsPowerShell does not already exists within your Documents folder then create it. Now add a file called Microsoft.PowerShell_profile.ps with the content below. Also copy the WinStyler.exe into the folder.
If your profile script fails then you probably have to lift the execution policy. The code below will change the execution policy. (Warning: This will also allow to run any other script on your machine. Including malware. Just saying.)
Download the WinStyler binary here http://sdrv.ms/1mvgxEH.
If you would rather see what will be executed on your machine and want to compile it yourself then the C# source code can be found here http://sdrv.ms/1mvgAAj .