<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Colorized capture of console screen in HTML and RTF.</title><link>http://blogs.msdn.com/powershell/archive/2009/01/11/colorized-capture-of-console-screen-in-html-and-rtf.aspx</link><description>In the previous post we demonstrated how we can use console host API to capture screen buffer contents as text. But what if we want some colors. Would not it be nice to publish colorized copy of console in HTML or insert it as part of Microsoft Word document.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Copy console screen to system clipboard</title><link>http://blogs.msdn.com/powershell/archive/2009/01/11/colorized-capture-of-console-screen-in-html-and-rtf.aspx#9306713</link><pubDate>Mon, 12 Jan 2009 05:12:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9306713</guid><dc:creator>Windows PowerShell Blog</dc:creator><description>&lt;p&gt;In the previous example we learned how to create a colorized copy of console in HTML and RTF format.&lt;/p&gt;
</description></item><item><title>re: Colorized capture of console screen in HTML and RTF.</title><link>http://blogs.msdn.com/powershell/archive/2009/01/11/colorized-capture-of-console-screen-in-html-and-rtf.aspx#9307461</link><pubDate>Mon, 12 Jan 2009 13:09:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9307461</guid><dc:creator>Stranger</dc:creator><description>&lt;p&gt;Nice! &lt;/p&gt;
&lt;p&gt;If you want to make your currently hard coded Html Encoding better then you can change it this way:&lt;/p&gt;
&lt;p&gt;[Reflection.Assembly]::LoadWithPartialName(&amp;quot;System.Web&amp;quot;)&lt;/p&gt;
&lt;p&gt;# Substitute characters which have special meaning in HTML. &lt;/p&gt;
&lt;p&gt;[System.Web.HttpUtility]::HtmlEncode( $cell.Character )&lt;/p&gt;</description></item><item><title>re: Colorized capture of console screen in HTML and RTF.</title><link>http://blogs.msdn.com/powershell/archive/2009/01/11/colorized-capture-of-console-screen-in-html-and-rtf.aspx#9308796</link><pubDate>Mon, 12 Jan 2009 21:31:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9308796</guid><dc:creator>PowerShellTeam</dc:creator><description>&lt;p&gt;Thanks, Stranger. That is wonderful. I will put it to my repository of PowerShell cool tricks.&lt;/p&gt;
</description></item><item><title>How to copy colorized script from PowerShell ISE</title><link>http://blogs.msdn.com/powershell/archive/2009/01/11/colorized-capture-of-console-screen-in-html-and-rtf.aspx#9312079</link><pubDate>Tue, 13 Jan 2009 05:02:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9312079</guid><dc:creator>Windows PowerShell Blog</dc:creator><description>&lt;p&gt;In the previous article we demonstrated how to use Console-Copy script to make a colorized copy of console&lt;/p&gt;
</description></item><item><title>re: Colorized capture of console screen in HTML and RTF.</title><link>http://blogs.msdn.com/powershell/archive/2009/01/11/colorized-capture-of-console-screen-in-html-and-rtf.aspx#9903403</link><pubDate>Mon, 05 Oct 2009 23:06:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9903403</guid><dc:creator>arenas</dc:creator><description>&lt;p&gt;$color1 = [System.Console]::ForegroundColor&lt;/p&gt;
&lt;p&gt;$c = ([Int64]- 400)&lt;/p&gt;
&lt;p&gt;$color2 = [System.ConsoleColor]::red&lt;/p&gt;
&lt;p&gt;function Normalize-HtmlColor ($color1,$color2) &lt;/p&gt;
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt; &amp;nbsp;if ($color1 -eq &amp;quot;Gray&amp;quot;) { $color1 = &amp;quot;peachpuff&amp;quot; } &lt;/p&gt;
&lt;p&gt; &amp;nbsp;if ($color2 -eq &amp;quot;Red&amp;quot;) { $color2 = &amp;quot;#FEDBB9&amp;quot; } &lt;/p&gt;
&lt;p&gt; &amp;nbsp;return $color1,$color2 &lt;/p&gt;
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;$e = $color2.[Int64]$c&lt;/p&gt;</description></item></channel></rss>