A more sensible PowerShell prompt

The default PowerShell prompt is long and irritating. I switch my default to the following:

A better PowerShell prompt

A better PowerShell prompt

In order to achieve this, I have the following script:

function prompt { Write-Host("%") -nonewline -foregroundcolor Yellow; return " "; }
c:
cd Scripts
" ";

You’ll also note that I change the default working directory to C:\Scripts, which is where I keep all my PowerShell scripts and saves me a little extra time.

In order to implement this, you’ll need to create the folder C:\Users\{USERNAME}\Documents\WindowsPowerShell and save the file as profile.ps1.

This entry was posted in Systems Administration and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

What is 11 + 12 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple question (so we know that you are a human)