Language: PowerShell
Powershell Current Path In Command Prompt Title
$isAdmin = !(($env:SESSIONNAME).Length -gt 0) function Prompt { if ($isAdmin) { $host.ui.RawUI.WindowTitle = '[Admin] ' + $(get-location) "#>" } else { $host.ui.RawUI.WindowTitle = $(get-location) "$>" } }
Tags:
Description:
Put that in your profile.ps1 file
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search


I posted a modified version of this at http://codepaste.net/4b5eir . It keeps the working directory in the prompt as well.