PowerShell easy location
Posted On October 21, 2019
What an easy way to clean up the view of your PowerShell path. Add this into your profile if you want to save some screen space and work in a directory other than c:\.
function prompt {$host.ui.rawui.WindowTitle = (Get-Location); "PS> "}
You can also grab the current time and place that in the prompt.
function prompt {$Time = (Get-Date).ToString("hh:mm") ; $host.ui.rawui.WindowTitle = (Get-Location); "$Time PS> "}
Use Get-Location to see which path you are in if you need to navigate somewhere else.