The Exchange 2007 Wiki

How to Change the Prompt

The built in 'prompt' function governs what the PowerShell prompt will look like and in order to change it all you have to do is modify this function.

For example to display a prompt that has your current location followed by a new line, a $ sign and a space, simply type:

function prompt {
"$(Get-Location)>`n`$ "
}

This should display:

C:\WINDOWS\system32\WindowsPowerShell\v1.0>
$

 

 

 

 

 

 

Disclaimer: The sample scripts are meant to serve as examples and may need modifications before they will work in your environment. The authors of the script are not responsible for any negative outcome that may result from using them. 

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 8/4/06 1:38 PM