I’m practically bouncing off the walls (I am so easily amused) over a new profile change I just made. I’ve added this to both my ISE and non ISE PowerShell profiles. What this will do is keep your display prompt at PS> and the top of the window will then show your current location. No longer do you need to suffer through a prompt that is ever growing in length as you change directories.
To access your profile easily to add this code at the end, simply open PowerShell or PowerShell_ISE and at the prompt type NotePad $Profile and press enter. Paste this code at the bottom of the profile page and save it.
[code PowerShell]
function prompt
{
'PS> '
$host.UI.RawUI.WindowTitle = Get-Location
}
[/code]
Close and re-open PowerShell and do a happy dance when you see how your prompt now behaves.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.