Just put the function prompt
in your PowerShell profile (notepad $PROFILE
), e.g.:
function prompt {"PS: $(get-date)>"}
or colored:
function prompt
{
Write-Host ("PS " + $(get-date) +">") -nonewline -foregroundcolor White
return " "
}
More Related Contents:
- How to do password-less login using plink? [closed]
- Using UTF-8 Encoding (CHCP 65001) in Command Prompt / Windows Powershell (Windows 10)
- How to run a PowerShell script without displaying a window?
- How to run a PowerShell script
- How to run a PowerShell script from a batch file
- $LastExitCode=0, but $?=False in PowerShell. Redirecting stderr to stdout gives NativeCommandError
- How to run a PowerShell script within a Windows batch file
- How do I get the current username in Windows PowerShell?
- Unix tail equivalent command in Windows Powershell
- PowerShell: Setting an environment variable for a single command only
- Capture program stdout and stderr to separate variables
- Convert a small PS script into a long line in a .BATch file
- How does PowerShell treat “.” in paths?
- How do you successfully change execution policy and enable execution of PowerShell scripts
- Powershell’ is not recognized as an internal or external command, operable program or batch file
- Can I send some text to the STDIN of an active process under Windows?
- PowerShell stripping double quotes from command line arguments
- Get Folder Size from Windows Command Line
- How to create a Run As Administrator shortcut using Powershell
- Start a detached background process in PowerShell
- How to output something in PowerShell
- Windows Script Host Error: Invalid character – Code:800A03F6 – Source: Microsoft JScript compilation error
- PsExec Throws Error Messages, but works without any problems
- How to add more than one machine to the trusted hosts list using winrm
- What’s the environment variable for the path to the desktop?
- Powershell Add System Variable
- Can we see the source code for PowerShell cmdlets?
- Powershell script does not run via Scheduled Tasks
- How can I source variables from a .bat file into a PowerShell script?
- Adding path permanently to windows using powershell doesn’t appear to work