<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Leon's blog</title><subtitle type="html" /><id>http://blogs.msdn.com/leonbrag/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/leonbrag/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/leonbrag/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2006-08-31T18:37:00Z</updated><entry><title>Reboot or Shutdown WM6 Smartphone</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/leonbrag/archive/2008/02/11/reboot-or-shutdown-wm6-smartphone.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="181027" href="http://blogs.msdn.com/leonbrag/attachment/7601120.ashx" /><id>http://blogs.msdn.com/leonbrag/archive/2008/02/11/reboot-or-shutdown-wm6-smartphone.aspx</id><published>2008-02-11T08:08:00Z</published><updated>2008-02-11T08:08:00Z</updated><content type="html">&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;</content><author><name>leonbrag</name><uri>http://blogs.msdn.com/members/leonbrag.aspx</uri></author><category term="Smartphone" scheme="http://blogs.msdn.com/leonbrag/archive/tags/Smartphone/default.aspx" /><category term="Shutdown" scheme="http://blogs.msdn.com/leonbrag/archive/tags/Shutdown/default.aspx" /><category term="WM6" scheme="http://blogs.msdn.com/leonbrag/archive/tags/WM6/default.aspx" /><category term="Reboot" scheme="http://blogs.msdn.com/leonbrag/archive/tags/Reboot/default.aspx" /></entry><entry><title>Screen shoots for WM6 Battery utility</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/leonbrag/archive/2008/01/16/screen-shoots-for-wm6-battery-utility.aspx" /><link rel="enclosure" type="image/jpeg" length="43311" href="http://blogs.msdn.com/leonbrag/attachment/7126686.ashx" /><id>http://blogs.msdn.com/leonbrag/archive/2008/01/16/screen-shoots-for-wm6-battery-utility.aspx</id><published>2008-01-16T08:39:00Z</published><updated>2008-01-16T08:39:00Z</updated><content type="html">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;</content><author><name>leonbrag</name><uri>http://blogs.msdn.com/members/leonbrag.aspx</uri></author></entry><entry><title>A CAB file only for WM6 battery utility</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/leonbrag/archive/2008/01/16/a-cab-file-only-for-wm6-battery-utility.aspx" /><link rel="enclosure" type="application/octet-stream" length="28792" href="http://blogs.msdn.com/leonbrag/attachment/7126663.ashx" /><id>http://blogs.msdn.com/leonbrag/archive/2008/01/16/a-cab-file-only-for-wm6-battery-utility.aspx</id><published>2008-01-16T08:37:00Z</published><updated>2008-01-16T08:37:00Z</updated><content type="html">&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;</content><author><name>leonbrag</name><uri>http://blogs.msdn.com/members/leonbrag.aspx</uri></author></entry><entry><title>A battery status utility for your Windows Mobile 6 powered Smartphone</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/leonbrag/archive/2008/01/16/a-battery-status-utility-for-your-windows-mobile-6-powered-smartphone.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="423485" href="http://blogs.msdn.com/leonbrag/attachment/7126617.ashx" /><id>http://blogs.msdn.com/leonbrag/archive/2008/01/16/a-battery-status-utility-for-your-windows-mobile-6-powered-smartphone.aspx</id><published>2008-01-16T08:20:00Z</published><updated>2008-01-16T08:20:00Z</updated><content type="html">&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;</content><author><name>leonbrag</name><uri>http://blogs.msdn.com/members/leonbrag.aspx</uri></author><category term="Windows Mobile 6.0 Smartphone" scheme="http://blogs.msdn.com/leonbrag/archive/tags/Windows+Mobile+6.0+Smartphone/default.aspx" /></entry><entry><title>Developing for PowerShell</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/leonbrag/archive/2006/10/10/Developing-for-PowerShell.aspx" /><id>http://blogs.msdn.com/leonbrag/archive/2006/10/10/Developing-for-PowerShell.aspx</id><published>2006-10-10T19:34:00Z</published><updated>2006-10-10T19:34:00Z</updated><content type="html">&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;</content><author><name>leonbrag</name><uri>http://blogs.msdn.com/members/leonbrag.aspx</uri></author></entry><entry><title>PowerShell Rules!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/leonbrag/archive/2006/08/31/733799.aspx" /><id>http://blogs.msdn.com/leonbrag/archive/2006/08/31/733799.aspx</id><published>2006-08-31T20:37:00Z</published><updated>2006-08-31T20:37:00Z</updated><content type="html">&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;</content><author><name>leonbrag</name><uri>http://blogs.msdn.com/members/leonbrag.aspx</uri></author></entry></feed>