LoginSignup
33

More than 5 years have passed since last update.

かわいい PowerShell プロンプト

Posted at

PowerShell のウインドウは全体的に、あんまりかわいくないな(きれいに全画面表示できないところとか)
と感じていたので、プロンプトを、かわいくしてみる。
correct? 知らない子ですね。

顔文字

function Prompt {
    if ($?) {
        Write-Host "(*'-')" -NoNewLine -ForegroundColor "Green"
        return "> "
    } else {
        Write-Host "(*;-;)" -NoNewLine -ForegroundColor "Red"
        return "> "
    }
}

2014-02-17_21h01_58.png

アイコンっぽい感じ

function Prompt {
    if ($?) {
        Write-Host "☀" -NoNewLine -ForegroundColor "Red"
        return "> "
    } else {
        Write-Host "☂" -NoNewLine -ForegroundColor "Cyan"
        return "> "
    }
}

weather.png

see also

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
33