<?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>Leon's blog</title><link>http://blogs.msdn.com/leonbrag/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Reboot or Shutdown WM6 Smartphone</title><link>http://blogs.msdn.com/leonbrag/archive/2008/02/11/reboot-or-shutdown-wm6-smartphone.aspx</link><pubDate>Mon, 11 Feb 2008 08:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7601120</guid><dc:creator>leonbrag</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/leonbrag/comments/7601120.aspx</comments><wfw:commentRss>http://blogs.msdn.com/leonbrag/commentrss.aspx?PostID=7601120</wfw:commentRss><description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I wrote little utility to either quickly shutdown or to reboot my WM6 BlackJack2 Smartphone. This utility should install and work on any WM6 and WM5&amp;nbsp;device - landscape or portait screen mode.&amp;nbsp;&amp;nbsp;Sources, cab and a screenshot all attached.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Leon&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7601120" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/leonbrag/attachment/7601120.ashx" length="181027" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/leonbrag/archive/tags/Smartphone/default.aspx">Smartphone</category><category domain="http://blogs.msdn.com/leonbrag/archive/tags/Shutdown/default.aspx">Shutdown</category><category domain="http://blogs.msdn.com/leonbrag/archive/tags/WM6/default.aspx">WM6</category><category domain="http://blogs.msdn.com/leonbrag/archive/tags/Reboot/default.aspx">Reboot</category></item><item><title>Screen shoots for WM6 Battery utility</title><link>http://blogs.msdn.com/leonbrag/archive/2008/01/16/screen-shoots-for-wm6-battery-utility.aspx</link><pubDate>Wed, 16 Jan 2008 08:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7126686</guid><dc:creator>leonbrag</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/leonbrag/comments/7126686.aspx</comments><wfw:commentRss>http://blogs.msdn.com/leonbrag/commentrss.aspx?PostID=7126686</wfw:commentRss><description>As promised these are the screen shots for WM6 Battery level utility&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7126686" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/leonbrag/attachment/7126686.ashx" length="43311" type="image/jpeg" /></item><item><title>A CAB file only for WM6 battery utility</title><link>http://blogs.msdn.com/leonbrag/archive/2008/01/16/a-cab-file-only-for-wm6-battery-utility.aspx</link><pubDate>Wed, 16 Jan 2008 08:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7126663</guid><dc:creator>leonbrag</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/leonbrag/comments/7126663.aspx</comments><wfw:commentRss>http://blogs.msdn.com/leonbrag/commentrss.aspx?PostID=7126663</wfw:commentRss><description>&lt;P&gt;As promised, this is just a CAB file for the WM6 Battery Utility.&lt;/P&gt;
&lt;P&gt;Copy CAB file to the device (via ActiveSync or any other means) and run it.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7126663" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/leonbrag/attachment/7126663.ashx" length="28792" type="application/octet-stream" /></item><item><title>A battery status utility for your Windows Mobile 6 powered Smartphone</title><link>http://blogs.msdn.com/leonbrag/archive/2008/01/16/a-battery-status-utility-for-your-windows-mobile-6-powered-smartphone.aspx</link><pubDate>Wed, 16 Jan 2008 08:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7126617</guid><dc:creator>leonbrag</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/leonbrag/comments/7126617.aspx</comments><wfw:commentRss>http://blogs.msdn.com/leonbrag/commentrss.aspx?PostID=7126617</wfw:commentRss><description>&lt;FONT face=Calibri size=3&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Hi,&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;I just got WM6 powered Smartphone and discovered that it requires no less than 5-6 clicks to see a graphical view of the battery. And even then I still can’t see actual percentage of the charge left. Long story short I have written a utility which shows battery charge for only &lt;B&gt;WM 6.0 Powered devices which run in landscape mode&lt;/B&gt; (Blackjack II, new Motorola Q Global from Cingular, etc).&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Depending on the charge you will see one of the following screen. Don’t worry about existing, if you don’t click Exit, application will exit after 7 seconds, so precious resources won’t be wasted.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;To install application:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1"&gt;&lt;SPAN style="COLOR: #1f497d; mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;Connect device via ActiveSync to your PC. ActiveSync has an option to explore your phone, where you can see Smartphon’s file system.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1"&gt;&lt;SPAN style="COLOR: #1f497d; mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;Copy attached file to the Smartphone and run it&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;You can then use functionality of the Smartphone to add shortcut to the application (which you will find under Start menu as a green battery icon “Battery Meter”) to either a Speed Dial or Fn key (on Blackjack II). &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;This will allow you to hit one key and see battery status in glance. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;I will be posting sources for this application as well. Is was very simple to write. I have used two great references:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo2"&gt;&lt;SPAN style="COLOR: #1f497d; mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/aa457088.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/aa457088.aspx"&gt;&lt;FONT color=#800080&gt;http://msdn2.microsoft.com/en-us/library/aa457088.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo2"&gt;&lt;SPAN style="COLOR: #1f497d; mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;A href="http://support.microsoft.com/kb/816195" mce_href="http://support.microsoft.com/kb/816195"&gt;&lt;FONT color=#800080&gt;http://support.microsoft.com/kb/816195&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;Attached is a complete project. I will also attach just a CAB file and screen shoots&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7126617" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/leonbrag/attachment/7126617.ashx" length="423485" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/leonbrag/archive/tags/Windows+Mobile+6.0+Smartphone/default.aspx">Windows Mobile 6.0 Smartphone</category></item><item><title>Developing for PowerShell</title><link>http://blogs.msdn.com/leonbrag/archive/2006/10/10/Developing-for-PowerShell.aspx</link><pubDate>Tue, 10 Oct 2006 19:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:813413</guid><dc:creator>leonbrag</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/leonbrag/comments/813413.aspx</comments><wfw:commentRss>http://blogs.msdn.com/leonbrag/commentrss.aspx?PostID=813413</wfw:commentRss><description>&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;If you have installed latest SDK for &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;Vista&lt;/st1:place&gt; (&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=117ecfd3-98ad-4d67-87d2-e95a8407fa86&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=117ecfd3-98ad-4d67-87d2-e95a8407fa86&amp;amp;DisplayLang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=117ecfd3-98ad-4d67-87d2-e95a8407fa86&amp;amp;DisplayLang=en&lt;/A&gt;) and trying to write an applications for Windows PowerShell (&lt;A href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx" mce_href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx&lt;/A&gt;) you may be looking for System.Management.Automation.dll assembly.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;It is located in &lt;STRONG&gt;c:\program files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0&lt;o:p&gt;&lt;/o:p&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=813413" width="1" height="1"&gt;</description></item><item><title>PowerShell Rules!</title><link>http://blogs.msdn.com/leonbrag/archive/2006/08/31/733799.aspx</link><pubDate>Thu, 31 Aug 2006 20:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:733799</guid><dc:creator>leonbrag</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/leonbrag/comments/733799.aspx</comments><wfw:commentRss>http://blogs.msdn.com/leonbrag/commentrss.aspx?PostID=733799</wfw:commentRss><description>&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;I have started to experiment with Windows PowerShell (&lt;A href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx&lt;/A&gt;). &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;I have notice interesting fact. Compare the output format of two commands&amp;nbsp;below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; Get-Process | where {$_.processname -eq "svchost"}&lt;/P&gt;
&lt;P&gt;Command above produces nicely formated output in form of the table.&lt;/P&gt;
&lt;P&gt;Command below produces output like this, albiet in red color:&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; Get-Process | where {$_.processname -eq "svchost"} | Write-Host -ForegroundColor red&lt;/P&gt;
&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff" color=#ff0000&gt;System.Diagnostics.Process (svchost)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Why is table lost? &lt;/P&gt;
&lt;P&gt;Write-Host converts output to the string. &lt;/P&gt;
&lt;P&gt;Solution is to use out-string cmdlet. Command below will show formated table in the red color.&lt;/P&gt;
&lt;P&gt;PS C:\&amp;gt; Get-Process | where {$_.processname -eq "svchost"} | out-string | Write-Host -ForegroundColor red&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=733799" width="1" height="1"&gt;</description></item></channel></rss>