Search code examples
powershellprompt

How to hide "PS C:\>" in powershell?


So you know how in powershell if you enter a command infront of it there will always be "PS (directory)>". I know its possible in cmd with a simple command but how do you do this in powershell?

so:

  • Hide the text(PS C:>) thats infront of commands
  • If possible through a command

If any of you know the fix please let me know. If i find it first i will self anwser.

(I later found this dup):Windows PowerShell: changing the command prompt


Solution

  • Just like Calculuswhiz mentioned, the following should work:

    Function Prompt {" "}
    

    Simply change it by adding anything else inside the double quotes.