# Write-Color – 2 year Anniversary Edition – v0.3

That was a bit unexpected. The day I revisit Write-Color for PowerShell to release new version of Write-Color after some minor…

blog

09 Apr 2018 de

[Bilder ansehen (2)](#pf-content-image-1-0)

That was a bit unexpected. The day I revisit **Write-Color** for **PowerShell** to release new version of **Write-Color** after some minor changes it turns out my original version was released 2 years ago, exactly on 9th of April 2016! What is **Write-Color** you may ask… I hear you.. well it's a wrapper for **Write-Host**. It allows you to create, in an easy way, a colorized version of your script output, among other things.

> Please notice this article **contains parts of information **(still useful) and **may not reflect all functionalities of this module**. For download, source code and so on you should refer to the dedicated **[PSWriteColor](https://evotec.xyz/hub/scripts/pswritecolor/) **module page. After reading this one… of course! It contains useful *information*, *examples *and *know-how*.

### 💡 What is it all about?

I understand now… but what is it? Well lets take a look at example…

[!\[Write-Color example output showing timestamped configuration checks with highlighted parameter names and status text in different colors.\](/wp-content/uploads/2018/04/img_5acbaf1d44692.png)](/wp-content/uploads/2018/04/img_5acbaf1d44692.png)

Normally it would take lots of code to achieve something similar. But with **Write-Color** it's quite easy. Each one is single line of code:

```plain
Clear-Host
. "C:\Support\Scripts\Includes\Write-Color.ps1" # Include Write-Color

Write-Color "[i] ", "Parameter in configuration of ", "EmailParameters.EmailFrom", " exists." -Color White, White, Green, White -ShowTime
Write-Color "[i] ", "Parameter in configuration of ", "EmailParameters.EmailTo", " exists." -Color White, White, Green, White -ShowTime
```

Now how about writing a command and then after it's done, and depending if it's Success or Failure color it as such?

```plain
Clear-Host
. "C:\Support\Scripts\Includes\Write-Color.ps1" # Include Write-Color
Write-Color "[i] ", "I will send email soon...", "Get ready.." -Color White
Write-Color "[i] ", "Sending email...." -Color White, White -NoNewLine

if ($true) {
    Write-Color -Text "OK" -Color Green
}
```

[!\[Write-Color example output printing a sending email status message followed by a green OK result.\](/wp-content/uploads/2018/04/img_5acba4caacd00.png)](/wp-content/uploads/2018/04/img_5acba4caacd00.png)

Isn't that easy? There are far more possibilities… so go ahead and get [Write-Color.ps1](https://evotec.xyz/hub/scripts/pswritecolor/)

### 💡 What's new in this version

#### Version 0.3 (9th April 2018)

- added -ShowTime
- added -NoNewLine
- added function description
- changed some formatting

#### Version 0.2 (29th June 2017)

- added logging to file

#### Version 0.1 (9th April 2016)

- first public release

## Zugehörige Projekte

Projekte, die zu Tags, Kategorien und Inhalt dieses Beitrags passen.

[Alle Projekte](/de/projekte/)

Projekte werden abgeglichen...

[Zurück zum Blog](/blog)

## Ähnliche Beiträge

- [Write-Color is now published as PowerShell Module](/de/blog/write-color-is-now-published-as-powershell-module/)
- [PowerShell – How to format Write-Host with multiple colors](/de/blog/powershell-how-to-format-powershell-write-host-with-multiple-colors/)
- [Submitting blogs to web.archive.org using PowerShell](/de/blog/submitting-blogs-to-web-archive-org-using-powershell/)

<!-- PowerForge markdown artifact sha256:0CE9CC79689D9D75B13F1BF9AFA1B30EEE641D98355A9DA7B09BEF25A5F5C84E -->
