<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Customizing the PowerShell command prompt</title>
	<atom:link href="http://www.johndcook.com/blog/2008/05/12/customizing-the-powershell-command-prompt/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johndcook.com/blog/2008/05/12/customizing-the-powershell-command-prompt/</link>
	<description>The blog of John D. Cook</description>
	<lastBuildDate>Wed, 17 Mar 2010 12:14:46 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Prompts in PowerShell &#124; David&#8217;s Technical Musings</title>
		<link>http://www.johndcook.com/blog/2008/05/12/customizing-the-powershell-command-prompt/comment-page-1/#comment-27301</link>
		<dc:creator>Prompts in PowerShell &#124; David&#8217;s Technical Musings</dc:creator>
		<pubDate>Fri, 13 Nov 2009 19:07:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/2008/05/12/customizing-the-powershell-command-prompt/#comment-27301</guid>
		<description>[...] The Endeavor - Customizing the PowerShell command prompt [...]</description>
		<content:encoded><![CDATA[<p>[...] The Endeavor &#8211; Customizing the PowerShell command prompt [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alf</title>
		<link>http://www.johndcook.com/blog/2008/05/12/customizing-the-powershell-command-prompt/comment-page-1/#comment-20879</link>
		<dc:creator>Alf</dc:creator>
		<pubDate>Thu, 09 Jul 2009 17:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/2008/05/12/customizing-the-powershell-command-prompt/#comment-20879</guid>
		<description>my way to do it

thanks

function prompt 
{ 
	$cwd = (get-location).Path
	
	[array]$cwdt=$()
	$cwdi=-1
	do {$cwdi=$cwd.indexofany(&quot;\\&quot;,$cwdi+1) ; [array]$cwdt+=$cwdi} until($cwdi -eq -1)
	
	if ($cwdt.count -gt 3) {
  $cwd = $cwd.substring(0,$cwdt[0]) + &quot;\..&quot; + $cwd.substring($cwdt[$cwdt.count-3])
  }

	$host.UI.RawUI.WindowTitle = &quot;$(hostname) - $env:USERDNSDOMAIN\$($env:username)&quot;
	$host.UI.Write(&quot;Yellow&quot;, $host.UI.RawUI.BackGroundColor, &quot;[PS]&quot;)
	&quot; $cwd&gt;&quot;
}</description>
		<content:encoded><![CDATA[<p>my way to do it</p>
<p>thanks</p>
<p>function prompt<br />
{<br />
	$cwd = (get-location).Path</p>
<p>	[array]$cwdt=$()<br />
	$cwdi=-1<br />
	do {$cwdi=$cwd.indexofany(&#8221;\\&#8221;,$cwdi+1) ; [array]$cwdt+=$cwdi} until($cwdi -eq -1)</p>
<p>	if ($cwdt.count -gt 3) {<br />
  $cwd = $cwd.substring(0,$cwdt[0]) + &#8220;\..&#8221; + $cwd.substring($cwdt[$cwdt.count-3])<br />
  }</p>
<p>	$host.UI.RawUI.WindowTitle = &#8220;$(hostname) &#8211; $env:USERDNSDOMAIN\$($env:username)&#8221;<br />
	$host.UI.Write(&#8221;Yellow&#8221;, $host.UI.RawUI.BackGroundColor, &#8220;[PS]&#8220;)<br />
	&#8221; $cwd&gt;&#8221;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PowerShell Prompt Customization : Philippe</title>
		<link>http://www.johndcook.com/blog/2008/05/12/customizing-the-powershell-command-prompt/comment-page-1/#comment-14004</link>
		<dc:creator>PowerShell Prompt Customization : Philippe</dc:creator>
		<pubDate>Mon, 02 Mar 2009 18:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/2008/05/12/customizing-the-powershell-command-prompt/#comment-14004</guid>
		<description>[...] to define a function called &quot;prompt&quot; that returns a String. I found a nice prompt script there, but was not satisfied with it as it hides the drive. I modified it a bit in order to show the [...]</description>
		<content:encoded><![CDATA[<p>[...] to define a function called &quot;prompt&quot; that returns a String. I found a nice prompt script there, but was not satisfied with it as it hides the drive. I modified it a bit in order to show the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PowerScripting Podcast - Episode 27 - Darren Mar-Elia talks about Group Policy &#171; PowerScripting Podcast</title>
		<link>http://www.johndcook.com/blog/2008/05/12/customizing-the-powershell-command-prompt/comment-page-1/#comment-806</link>
		<dc:creator>PowerScripting Podcast - Episode 27 - Darren Mar-Elia talks about Group Policy &#171; PowerScripting Podcast</dc:creator>
		<pubDate>Mon, 26 May 2008 19:45:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/2008/05/12/customizing-the-powershell-command-prompt/#comment-806</guid>
		<description>[...] John Cook has a new blog post that talks about customizing the PowerShell command prompt [...]</description>
		<content:encoded><![CDATA[<p>[...] John Cook has a new blog post that talks about customizing the PowerShell command prompt [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
