Thursday, 29 December 2016

How to customize the Powershell Prompt

9:56 pm
By default when you open up Powershell console, you will get a screen as shown below :


so today we are going to learn how to replace the PS C:\windows\system32> with any thing lets say I ♥ PowerShell. So lets learn how to do it.

STEP 1 : 

We are going to modify the Powershell Profile for this. So open PowerShell as Administrator & give the below command : 

Test-Path $Profile



If it return True that means Powershell profile is created, if it's False then create the powershell profile by executing the below comand : 

New-Item -Path $PROFILE -Type File -Force

STEP 2 :

Since the Profile is now created, now open the profile in Notepad i.e. 

notepad $Profile

STEP 3 :

Now Copy-Paste the below function in that file and Save it.


You can the change the content as per your choice.



If any message or warning comes then change the encoding type while saving (Since I am using a Heart Shape by default ANSI Encoding will not support it.) 

Once Saved now close the Powershell console and Open it again and see what you got now!!





Hope you all liked this Post. Do Like, Share and Comment.


Contact us

Name

Email *

Message *

Recent

recentposts

Random

randomposts