Color for the PROMPT (just the PROMPT proper) in cmd.exe and PowerShell?

You can add a Prompt function to your profile in Powershell to pretty much do whatever you want with the prompt. So for instance something like this:

function prompt
{
    Write-Host "PS $(get-location)>"  -nonewline -foregroundcolor Magenta
    return ' '
}

To open or create your PowerShell profile, run this:

if(Test-Path $profile){notepad $profile}else{New-Item -path $profile -type file -force}

follow this link. There's an ANSI hack developped for the CMD.exe shell

link to ansi hack

I've tried it on my win 7 professional SP1 and works like a charm

enter image description here