Using Windows PowerShell, how do I change the command prompt?
For example, the default prompt says
PS C:Documents and SettingsgovendesMy Documents>
I want to customize that string.
Just put the function prompt in your PowerShell profile (notepad $PROFILE), e.g.:
prompt
notepad $PROFILE
function prompt {"PS: $(get-date)>"}
or colored:
function prompt { Write-Host ("PS " + $(get-date) +">") -nonewline -foregroundcolor White return " " }
1.4m articles
1.4m replys
5 comments
57.0k users