DEV Community


Posted on

Change the prompt in powershell

Hello everyone,

short post this week. Was working on another post but not really satisfied with it. So you get this short intermission.

What i learned not to long ago ist, that you are able to change you prompt in powershell. You have to put a function named prompt into your Powershell Profile.

function prompt {"PS: $(get-date) / $PWD \n >"}

Enter fullscreen mode Exit fullscreen mode

And after the next start you will get the changed prompt:

Alt Text

By the way a line break in powershell is written like this:

Enter fullscreen mode Exit fullscreen mode

The double quotes are important, if you use single quotes it will not work.

Discussion (0)