Wednesday, May 4, 2016

Customise the powershell prompt

When you're happily typing powershell commands all day long, you may want to check when you executed a particular command.

With this little bit of code you can configure the prompt to record the day, time and location so that the powershell window can be a record of when each command was run.

One liner !

function prompt {$(get-date -UFormat %d/%m) + " " + $(get-date -UFormat %H:%M) + " " + $(get-location) +" > "}