Here’s a useful Powershell trick.
prompt() function is used to generate the text shown as the Powershell prompt in an interactive window.
prompt() you can make some useful changes, taking control of the prompt display. Put the changes into
your Powershell profile, and they become permanent.
For example, the following version of
prompt() does two things.
Firstly, it modifies the title of the current Powershell window to reflect the current directory, making it easier to find the window you want when you have several Powershell windows open.
Secondly, it puts the machine name into the prompt - useful for me as I typically have four or five remote desktop windows open to different servers; anything that helps me avoid running a script on the wrong machine is worth its weight in gold.
What might you put in your
Some links …