I wanted a way to change the powershell prompt, in particular to:
Display the current path in the Shell window
Change the prompt to “[LineNumber]:”
Show the stcck level when “pushd” is used
Then a colleague showed me this.
Add the following function to your current profile - it’s an override for the prompt method:
The easiest way to do this is:
1. In PS type “$profile” this will show you the location of the current active profile
2. Open that file in notepad and paste the function above into it
3. In PS type “.$profile” to reload the altered profile