The default PowerShell prompt is long and irritating. I switch my default to the following:
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.
A more sensible PowerShell prompt
The default PowerShell prompt is long and irritating. I switch my default to the following:
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\WindowsPowerShelland save the file asprofile.ps1.