Is it possible to override the invitation function specified in the user profile after starting the shell?
To change the prompt function at any time, simply run the following command at the PowerShell command prompt:
function prompt { "$env:computername $pwd>" }
Yes, just enter the code as usual:
function prompt { $random = new-object random $color=[System.ConsoleColor]$random.next(1,16) Write-Host ("PS " + $(get-location) +">") -nonewline -foregroundcolor $color return " " }
(credit http://mshforfun.blogspot.com/2006/05/perfect-prompt-for-windows-powershell.html )