<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>viveksharma.com: techlog</title>
        <link>http://viveksharma.com/TECHLOG/Default.aspx</link>
        <description />
        <language>en-US</language>
        <copyright>Vivek Sharma</copyright>
        <managingEditor>vivek@viveksharma.com</managingEditor>
        <generator>Subtext Version 2.0.0.43</generator>
        <image>
            <title>viveksharma.com: techlog</title>
            <url>http://viveksharma.com/TECHLOG/images/RSS2Image.gif</url>
            <link>http://viveksharma.com/TECHLOG/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Running scripts that only work under 32bit cleanly in 64bit PowerShell</title>
            <category>PowerShell</category>
            <link>http://viveksharma.com/TECHLOG/archive/2008/12/03/running-scripts-that-only-work-under-32bit-cleanly-in-64bit.aspx</link>
            <description>&lt;p&gt;The scenario is as following: you have some script that can only work in 32bit powershell (the COM objects it calles only work in 32 bit for example) but you are used to running 64bit powershell. So what to do you do? Easy, just write your script to check if its being called from a 32bit process and if not, spawn a copy of 32bit powershell to run itself! Tha way you never have to think about calling 32bit powershell explicitly. &lt;/p&gt;  &lt;p&gt;Here is the snippet:   &lt;br /&gt;&lt;/p&gt;  &lt;div&gt;   &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;     &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ($env:Processor_Architecture &lt;span style="color: #cc6633"&gt;-ne&lt;/span&gt; &lt;span style="color: #006080"&gt;"x86"&lt;/span&gt;)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;         write-warning &lt;span style="color: #006080"&gt;"Running x86 PowerShell..."&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;         &amp;amp;&lt;span style="color: #006080"&gt;"$env:windir\syswow64\windowspowershell\v1.0\powershell.exe"&lt;/span&gt; -noninteractive &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;              -noprofile -file $myinvocation.Mycommand.path -executionpolicy bypass&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;         exit&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt; # rest of your code&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Turns out I use this trick all the time as I frequently work with COM objects such as Office Charting Components which are only 32bit. &lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7af5a27d-bd45-4469-89e5-0a8ef9416aeb" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/PowerShell" rel="tag"&gt;PowerShell&lt;/a&gt;&lt;/div&gt;&lt;img src="http://viveksharma.com/TECHLOG/aggbug/53.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vivek Sharma</dc:creator>
            <guid>http://viveksharma.com/TECHLOG/archive/2008/12/03/running-scripts-that-only-work-under-32bit-cleanly-in-64bit.aspx</guid>
            <pubDate>Wed, 03 Dec 2008 08:08:30 GMT</pubDate>
            <wfw:comment>http://viveksharma.com/TECHLOG/comments/53.aspx</wfw:comment>
            <comments>http://viveksharma.com/TECHLOG/archive/2008/12/03/running-scripts-that-only-work-under-32bit-cleanly-in-64bit.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://viveksharma.com/TECHLOG/comments/commentRss/53.aspx</wfw:commentRss>
            <trackback:ping>http://viveksharma.com/TECHLOG/services/trackbacks/53.aspx</trackback:ping>
        </item>
        <item>
            <title>PowerShell version (sort of) of Unix&amp;rsquo;s du command</title>
            <link>http://viveksharma.com/TECHLOG/archive/2008/11/24/powershell-version-sort-of-of-unixrsquos-du-command.aspx</link>
            <description>&lt;p&gt;PS CTPv2 is finally performant enough with enumerating directories and files that its worthwhile to write deep file system traversal functions. Unix’s du was always incredibly useful for me when managing my files. Here’s the PS equivalent. &lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; du ($path = &lt;span class="str"&gt;'.\', $unit="MB", $round=0) &lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{ &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;   get-childitem $path -force | ? { &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;     $_.Attributes -like '*Directory*' } | %{ &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;        dir $_.FullName -rec -force | &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;           measure-object -sum -prop Length | &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;               add-member -name Path -value $_.Fullname -member NoteProperty -pass | &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                   select Path,Count,@{ expr={[math]::Round($_.Sum/&lt;span class="str"&gt;"1$unit"&lt;/span&gt;,$round)}; Name=&lt;span class="str"&gt;"Size($unit)"&lt;/span&gt;} &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;        } &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt;Sample: &lt;/p&gt;

&lt;pre class="csharpcode"&gt;[dronagiri] F:\Vivek\&amp;gt;du .\ –unit MB 

Path                                       Count            Size(MB)
----                                       -----            --------
F:\Vivek\Custom UI                           275                  18
F:\Vivek\Desktop                            1151                 114
F:\Vivek\Documents                         20338                3521&lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Hope this is useful for your file management. &lt;/p&gt;&lt;img src="http://viveksharma.com/TECHLOG/aggbug/52.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vivek Sharma</dc:creator>
            <guid>http://viveksharma.com/TECHLOG/archive/2008/11/24/powershell-version-sort-of-of-unixrsquos-du-command.aspx</guid>
            <pubDate>Tue, 25 Nov 2008 04:33:00 GMT</pubDate>
            <wfw:comment>http://viveksharma.com/TECHLOG/comments/52.aspx</wfw:comment>
            <comments>http://viveksharma.com/TECHLOG/archive/2008/11/24/powershell-version-sort-of-of-unixrsquos-du-command.aspx#feedback</comments>
            <wfw:commentRss>http://viveksharma.com/TECHLOG/comments/commentRss/52.aspx</wfw:commentRss>
            <trackback:ping>http://viveksharma.com/TECHLOG/services/trackbacks/52.aspx</trackback:ping>
        </item>
        <item>
            <title>Emacs powershell-mode.el updated to v0.5</title>
            <category>Emacs</category>
            <category>PowerShell</category>
            <link>http://viveksharma.com/TECHLOG/archive/2008/08/19/emacs-powershell-mode.el-updated-to-v0.5.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://www.viveksharma.com/techlog/attache/powershell-mode.el.txt" target="_blank"&gt;Here&lt;/a&gt; is the updated file. The old v0.4 version can &lt;a href="http://www.viveksharma.com/techlog/attache/powershell-mode.04.el.txt" target="_blank"&gt;still be downloaded&lt;/a&gt; as well. Many thanks to Richard Bielawski for taking the time to update some things and fix bugs. Change list from Richard's diff: &lt;/p&gt; &lt;ul&gt; &lt;li&gt;Indenting fixed on &amp;lt;tab&amp;gt;  &lt;/li&gt;&lt;li&gt;Elseif keyword added  &lt;/li&gt;&lt;li&gt;Support standard comment func  &lt;/li&gt;&lt;li&gt;Bug fixed when visiting files in major mode &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I didn't do a thorough test, simply used it in the following scenarios: visiting file, auto-load, colorization, indenting via &amp;lt;tab&amp;gt; and editing.&lt;/p&gt; &lt;p&gt;Apologies for the dastardly delay--but if you have improvements and suggestions / snippets, I'd be happy to include them and give you due credit. &lt;/p&gt; &lt;p&gt;Thanks again Richard! &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p /&gt; &lt;div style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px; display: inline" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8084de08-61e9-453e-acd5-46036a8e118b" class="wlWriterSmartContent"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/emacs" rel="tag"&gt;emacs&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/powershell" rel="tag"&gt;powershell&lt;/a&gt;&lt;/div&gt; &lt;p /&gt; &lt;div style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px; display: inline" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7f007bff-85d8-4576-950a-90841b136f56" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/emacs" rel="tag"&gt;emacs&lt;/a&gt;,&lt;a href="http://technorati.com/tags/powershell" rel="tag"&gt;powershell&lt;/a&gt;&lt;/div&gt;&lt;img src="http://viveksharma.com/TECHLOG/aggbug/51.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vivek Sharma</dc:creator>
            <guid>http://viveksharma.com/TECHLOG/archive/2008/08/19/emacs-powershell-mode.el-updated-to-v0.5.aspx</guid>
            <pubDate>Wed, 20 Aug 2008 02:52:43 GMT</pubDate>
            <wfw:comment>http://viveksharma.com/TECHLOG/comments/51.aspx</wfw:comment>
            <comments>http://viveksharma.com/TECHLOG/archive/2008/08/19/emacs-powershell-mode.el-updated-to-v0.5.aspx#feedback</comments>
            <slash:comments>8</slash:comments>
            <wfw:commentRss>http://viveksharma.com/TECHLOG/comments/commentRss/51.aspx</wfw:commentRss>
            <trackback:ping>http://viveksharma.com/TECHLOG/services/trackbacks/51.aspx</trackback:ping>
        </item>
        <item>
            <title>Quick Post: live.com is actually kind of nice...</title>
            <category>Microsoft</category>
            <category>Random</category>
            <link>http://viveksharma.com/TECHLOG/archive/2008/08/17/quick-post-live.com-is-actually-kind-of-nice.aspx</link>
            <description>&lt;div style="padding-right: 0px; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px; display: inline" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a6b44382-7a59-4ff6-a419-9369d72a45bf" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/live.com" rel="tag"&gt;live.com&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Microsoft" rel="tag"&gt;Microsoft&lt;/a&gt;&lt;/div&gt; &lt;p&gt;Just upgraded the blog so apologies for any downtime. Anyway, quick post to exclaim: &lt;a href="http://live.com" target="_blank"&gt;live.com&lt;/a&gt; is really quite useable! I know, I know, I work for Microsoft so that's why I'm saying &lt;a href="http://live.com" target="_blank"&gt;live.com&lt;/a&gt; is worth visiting... right? &lt;/p&gt; &lt;p&gt;No, not really. I don't do PR... :) Here is why I'm recommending it:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;The background picture is entertaining and often leads me to keep in touch with latest news (like the latest results from the Olympics)  &lt;/li&gt;&lt;li&gt;Search results are really consistent with what I expect to see (YMMV) &lt;/li&gt;&lt;li&gt;Its FAST - the background image comes up fast, the search results are fast!  &lt;/li&gt;&lt;li&gt;Image search is really fun to use (try searching for "Lolcatz") &lt;/li&gt;&lt;li&gt;Ever searched for "Rumour"? Its a misspelling (in US), live.com automatically corrects it. A bunch of other auto-correct features are subtle but useful. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Of course, I wish some other things should be fixed:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;There are links on the page to "MSN", "Live Search" and "Windows Live". Huh?&lt;/li&gt; &lt;li&gt;Related searches returns wacky results sometimes (I ego-searched and got back a random list of people). At least explain how those were generated. &lt;/li&gt; &lt;li&gt;This is a nit for the map feature: it doesn't render the UI usefully in my 1024 x 768 Lenovo. I guess mapping is a high-res feature! &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;So try out &lt;a href="http://live.com" target="_blank"&gt;live.com&lt;/a&gt;. Oh yeah, I heard they have a cashback scheme--haven't tried it personally so can't comment on that. &lt;/p&gt;&lt;img src="http://viveksharma.com/TECHLOG/aggbug/50.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vivek Sharma</dc:creator>
            <guid>http://viveksharma.com/TECHLOG/archive/2008/08/17/quick-post-live.com-is-actually-kind-of-nice.aspx</guid>
            <pubDate>Mon, 18 Aug 2008 05:27:20 GMT</pubDate>
            <wfw:comment>http://viveksharma.com/TECHLOG/comments/50.aspx</wfw:comment>
            <comments>http://viveksharma.com/TECHLOG/archive/2008/08/17/quick-post-live.com-is-actually-kind-of-nice.aspx#feedback</comments>
            <wfw:commentRss>http://viveksharma.com/TECHLOG/comments/commentRss/50.aspx</wfw:commentRss>
            <trackback:ping>http://viveksharma.com/TECHLOG/services/trackbacks/50.aspx</trackback:ping>
        </item>
        <item>
            <title>PowerShell Book Recommendations</title>
            <category>Exchange</category>
            <category>PowerShell</category>
            <link>http://viveksharma.com/TECHLOG/archive/2008/02/10/powershell-book-recommendations.aspx</link>
            <description>&lt;p&gt;Someone asked me to recommend a few books, so here they are: &lt;/p&gt;  &lt;p&gt;1) Windows PowerShell Cookbook by &lt;a href="http://leeholmes.com/blog" target="_blank"&gt;Lee Holmes&lt;/a&gt; (from PS Team) &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.oreilly.com/catalog/9780596528492/" target="_blank"&gt;&lt;img src="http://www.oreilly.com/catalog/covers/9780596528492_cat.gif" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;2) Windows PowerShell in Action by Bruce Payette (from PS Team) &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.manning.com/payette/" target="_blank"&gt;&lt;img src="http://www.manning.com/payette/payette_cover150.jpg" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;3) For Exchange specific stuff, I actually haven't tried any (makes sense as we were writing code most of the time :). Here are a few I dug up on the web, they look promising: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sapienpress.com/exchange.asp" target="_blank"&gt;&lt;img src="http://www.sapienpress.com/image/Exchange_Management_Shell_TFM-1.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In fact, a few guys I know wrote a very nice book that should definitely be on the top of the list. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.amazon.com/Professional-PowerShell-Exchange-2007-SP1/dp/0470226447/ref=sr_1_2/103-9221207-6881408?ie=UTF8&amp;amp;s=books&amp;amp;qid=1188276506&amp;amp;sr=8-2" target="_blank"&gt;&lt;img src="http://contentcafe.btol.com/Jacket/Jacket.aspx?SysID=quantum&amp;amp;CustID=books&amp;amp;Key=0470226447&amp;amp;TYPE=S&amp;amp;Return=0" /&gt;&lt;/a&gt;  &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Here's to more books, fame and fortune from these fine authors! &lt;/p&gt;&lt;img src="http://viveksharma.com/TECHLOG/aggbug/49.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vivek Sharma</dc:creator>
            <guid>http://viveksharma.com/TECHLOG/archive/2008/02/10/powershell-book-recommendations.aspx</guid>
            <pubDate>Mon, 11 Feb 2008 01:30:04 GMT</pubDate>
            <wfw:comment>http://viveksharma.com/TECHLOG/comments/49.aspx</wfw:comment>
            <comments>http://viveksharma.com/TECHLOG/archive/2008/02/10/powershell-book-recommendations.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://viveksharma.com/TECHLOG/comments/commentRss/49.aspx</wfw:commentRss>
            <trackback:ping>http://viveksharma.com/TECHLOG/services/trackbacks/49.aspx</trackback:ping>
        </item>
        <item>
            <title>ExchangeLabs will pwn you!</title>
            <category>Work</category>
            <category>ExchangeLabs</category>
            <link>http://viveksharma.com/TECHLOG/archive/2007/10/12/exchangelabs-will-pwn-you.aspx</link>
            <description>&lt;p&gt;So its been a long time since I last posted (last December actually!). A lot has happened since then: Exchange 2007 has shipped, Vista has shipped, Office 12 has shipped... and I've been working on, well, &lt;em&gt;new stuff&lt;/em&gt;. Since &lt;a href="http://msexchangeteam.com/archive/2007/10/08/447213.aspx"&gt;Terry unveiled on the team blog&lt;/a&gt; that we have a program called Exchange Labs, I might as well reveal that &lt;a href="http://exchangelabs.com/"&gt;http://exchangelabs.com&lt;/a&gt; also happens to be the &lt;em&gt;new stuff&lt;/em&gt; that I'm working on. &lt;/p&gt;
&lt;p&gt;I can't totally mention specifics, except that we are enabling a service at ** *** *, which by itself is really cool. And that's just the begining, we're also going to work on *******, *****, ***, **, ***, **, ***** ** ****, *** ****, and not to mention ******* **** *******! Apologies for ****'ing out some words, the censors around here are totally unreasonable :-) Given the new focus, I'll be posting more service and services related stuff on the blog. &lt;/p&gt;
&lt;p&gt;But I still love and use powershell, so I'll continue to sprinkle odds and ends on the blog as well. &lt;a href="http://blogs.technet.com/evand/default.aspx"&gt;Evan&lt;/a&gt; actually is a good guy to watch for more powershell goodies. Thanks for reading the blog and posting comments, I appreciate it very much!    BTW: The title is a side-effect of me spending lots of time with &lt;a href="http://halo3.com/"&gt;Halo 3&lt;/a&gt;. Here is the &lt;a href="http://en.wikipedia.org/wiki/Pwn"&gt;wikipedia entry for 'pwn'&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://viveksharma.com/TECHLOG/aggbug/47.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vivek Sharma</dc:creator>
            <guid>http://viveksharma.com/TECHLOG/archive/2007/10/12/exchangelabs-will-pwn-you.aspx</guid>
            <pubDate>Fri, 12 Oct 2007 08:10:58 GMT</pubDate>
            <wfw:comment>http://viveksharma.com/TECHLOG/comments/47.aspx</wfw:comment>
            <comments>http://viveksharma.com/TECHLOG/archive/2007/10/12/exchangelabs-will-pwn-you.aspx#feedback</comments>
            <wfw:commentRss>http://viveksharma.com/TECHLOG/comments/commentRss/47.aspx</wfw:commentRss>
            <trackback:ping>http://viveksharma.com/TECHLOG/services/trackbacks/47.aspx</trackback:ping>
        </item>
        <item>
            <title>Announcing the Exchange 2007 PowerShell Scriptacular demo pack!</title>
            <category>PowerShell</category>
            <category>Exchange</category>
            <link>http://viveksharma.com/TECHLOG/archive/2006/12/21/announcing-the-exchange-2007-powershell-scriptacular-demo-pack.aspx</link>
            <description>&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Dear Exchange 2007 Enthusiast(s), &lt;/p&gt;
&lt;p&gt;I'd like to announce the Exchange 2007 PowerShell Scriptacular (&lt;a href="http://www.viveksharma.com/techlog/attache/MS_Exchange_PowerShell_Scriptacular_V1.0.zip"&gt;download zipfile&lt;/a&gt;) demo pack. What is it you ask? Well... this collection of Exchange PowerShell scripts was developed by Mihai Jalobeanu and Vivek Sharma while they (we) developed the Exchange Management Shell. We had a lot of fun writing these scripts, and we used them to showcase the innovations in Exchange 2007 System Management--we also promised that when Exchange 2007 is released to the wild, that we'd make our favorite scripts available to everyone. So here they are! &lt;/p&gt;
&lt;p&gt;If you want our exact demo setup: to get started, put everything in a directory (d:\scripts or something), and run generate. You need datafiles and you need to customize initvars.ps1. If you don't, the demo pack won't work. &lt;/p&gt;
&lt;p&gt;Or you can just take a look at the scripts and learn from the bits and pieces that interest you. &lt;/p&gt;
&lt;p&gt;Note: These are Microsoft copyrighted samples, are provided as-is and confer no warranties or rights. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Script Pack Contents: &lt;/strong&gt; &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;addfakeservers.ps1 and removefakeservers.ps1 &lt;br /&gt;
    &lt;br /&gt;
    &lt;em&gt;NOT standalone&lt;/em&gt;. Makes it looks like your demo setup has more than one server. We use a very useful feature of Exchange 2007 setup to make this work. Basically we use the /provisionedserver switch to create pre-provisioned servers (AD objects). The admin interface detects these as servers, even though the hardware has not been installed yet. This enables server delegation and pre-provisioning in  Exchange topologies. &lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;balancemailboxes.ps1&lt;br /&gt;
    &lt;br /&gt;
    &lt;em&gt;Standalone&lt;/em&gt;. This script shows how you can use PowerShell to easily load balance mailboxes by size across servers. Key thing is the use of get-mailboxstatistics and move-mailbox. &lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;cleanup.ps1 and generate.ps1&lt;br /&gt;
    &lt;br /&gt;
    &lt;em&gt;NOT standalone&lt;/em&gt;. Cleanup.ps1 completely restores your demo environment to a basic-just-installed-Exchange state. New car smell not included. Generate kicks off everything else to generate the demo environment. &lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;initvars.ps1&lt;br /&gt;
    &lt;br /&gt;
    &lt;em&gt;NOT standalone&lt;/em&gt;. Standard variables shared by all the scripts. Called by generate.ps1. MAKE SURE TO EDIT THIS FILE to customize this for your environment. &lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;mailstorm.ps1 and mailstorm2.ps1 &lt;br /&gt;
    &lt;br /&gt;
    &lt;em&gt;Standalone with caveats&lt;/em&gt;. What's a demo Exchange enviroment without some email? BTW: this is the one script that is likely to not just work automatically in your environment. This is because we assume some basic auth settings to make the Hub server accept mail. This step is done in generate.ps1 so make sure you do that if you plan to use this script by itself. &lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;multi-matrix.ps1&lt;br /&gt;
    &lt;br /&gt;
    &lt;em&gt;Standalone&lt;/em&gt;. Totally totally useless. But cool damnit. This is the matrix unloaded ... er... powershelled. &lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;out-email.ps1&lt;br /&gt;
    &lt;br /&gt;
    &lt;em&gt;Standalone&lt;/em&gt;, with caveats. Just like the name implies, sends content over mail. You can pipe text to it. get-content c:\sometext.txt | out-email -to &lt;a href="mailto:jimmy@crackcornandidontcare.com"&gt;jimmy@crackcornandidontcare.com&lt;/a&gt; -subject "Report". It uses the "from" from initvars.ps1 so make sure to copy those lines as needed to make it standalone. &lt;br /&gt;
    &lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;out-html.ps1 and out-ie.ps1 &lt;br /&gt;
    &lt;br /&gt;
    &lt;em&gt;Standalone&lt;/em&gt;. I already posted these to &lt;a href="http://www.viveksharma.com/techlog"&gt;http://www.viveksharma.com/techlog&lt;/a&gt; earlier. &lt;br /&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The datafiles are politician names, committees, standard drafts of the European Union. We've used US congress / house data in the past too---anything goes, it was publicly available data so it works great for demos. &lt;/p&gt;
&lt;p&gt;The scripts (and their latest versions) can always be found at: &lt;a href="http://www.viveksharma.com/techlog"&gt;http://www.viveksharma.com/techlog&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;-Mihai Jalobeanu and Vivek Sharma &lt;/p&gt;&lt;img src="http://viveksharma.com/TECHLOG/aggbug/46.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vivek Sharma</dc:creator>
            <guid>http://viveksharma.com/TECHLOG/archive/2006/12/21/announcing-the-exchange-2007-powershell-scriptacular-demo-pack.aspx</guid>
            <pubDate>Fri, 22 Dec 2006 02:12:49 GMT</pubDate>
            <wfw:comment>http://viveksharma.com/TECHLOG/comments/46.aspx</wfw:comment>
            <comments>http://viveksharma.com/TECHLOG/archive/2006/12/21/announcing-the-exchange-2007-powershell-scriptacular-demo-pack.aspx#feedback</comments>
            <slash:comments>13</slash:comments>
            <wfw:commentRss>http://viveksharma.com/TECHLOG/comments/commentRss/46.aspx</wfw:commentRss>
            <trackback:ping>http://viveksharma.com/TECHLOG/services/trackbacks/46.aspx</trackback:ping>
        </item>
        <item>
            <title>How to get DL membership in Exchange 2007</title>
            <category>PowerShell</category>
            <category>Exchange</category>
            <link>http://viveksharma.com/TECHLOG/archive/2006/10/22/how-to-get-dl-membership-in-exchange-2007.aspx</link>
            <description>&lt;p&gt;Abshishek reminded me of this with &lt;a href="http://abhishek225.spaces.live.com/blog/cns!13469C7B7CE6E911!189.entry?_c11_blogpart_blogpart=blogview&amp;amp;_c=blogpart#permalink"&gt;his post&lt;/a&gt; on how to figure out &lt;em&gt;Security Group&lt;/em&gt; membership using PowerShell. But Distribution Groups are a whole different beast. So how do you do it? One way is to use the GUI: the awesome &lt;a href="http://msexchangeteam.com/archive/2006/10/20/429233.aspx"&gt;Exchange Management Console&lt;/a&gt; already shows you group membership. And on the cmdline you can do this in Exchange 2007: &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using server side filtering (faster):&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;   &lt;code&gt;$filterid = (get-user Administrator).Identity get-group -filter { Members -eq $filterid }&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using &lt;/strong&gt;&lt;strong&gt;client side filtering (slower):&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;   &lt;/strong&gt;&lt;code&gt;get-group | where { $_.Members -like '*Admin*' }&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;This can be adapted to do nested membership as well---I'll leave it to you to figure out how.&lt;/p&gt;&lt;img src="http://viveksharma.com/TECHLOG/aggbug/45.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vivek Sharma</dc:creator>
            <guid>http://viveksharma.com/TECHLOG/archive/2006/10/22/how-to-get-dl-membership-in-exchange-2007.aspx</guid>
            <pubDate>Mon, 23 Oct 2006 06:10:33 GMT</pubDate>
            <wfw:comment>http://viveksharma.com/TECHLOG/comments/45.aspx</wfw:comment>
            <comments>http://viveksharma.com/TECHLOG/archive/2006/10/22/how-to-get-dl-membership-in-exchange-2007.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://viveksharma.com/TECHLOG/comments/commentRss/45.aspx</wfw:commentRss>
            <trackback:ping>http://viveksharma.com/TECHLOG/services/trackbacks/45.aspx</trackback:ping>
        </item>
        <item>
            <title>How to record your shell session</title>
            <category>PowerShell</category>
            <link>http://viveksharma.com/TECHLOG/archive/2006/10/22/how-to-record-your-shell-session.aspx</link>
            <description>&lt;p&gt;PS&amp;gt; Start-Transcript &lt;br /&gt;
PS&amp;gt; # do a bunch of stuff &lt;br /&gt;
PS&amp;gt; Stop-Transcript # or just quit the shell &lt;/p&gt;
&lt;p&gt;This will create a file (by default in your My Documents folder) that is a verbatim copy of your shell session. No more copy and paste needed from the shell to notepad! A few other things of note: &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;This is the only way to capture verbose and warning information as those cannot be redirected from the shell like errors can (don't ask me why, but make sure to tell &lt;a href="http://blogs.msdn.com/powershell"&gt;Jeffrey Snover &lt;/a&gt;about this) &lt;/li&gt;
    &lt;li&gt;You can start a transcript by default every time you start your shell by putting 'start-transcript' in your profile.ps1 file &lt;/li&gt;
    &lt;li&gt;There can change the location of the text file that is created. Look at get-help start-transcript for more details &lt;/li&gt;
&lt;/ul&gt;
Have fun! &lt;img src="http://viveksharma.com/TECHLOG/aggbug/44.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vivek Sharma</dc:creator>
            <guid>http://viveksharma.com/TECHLOG/archive/2006/10/22/how-to-record-your-shell-session.aspx</guid>
            <pubDate>Sun, 22 Oct 2006 18:10:00 GMT</pubDate>
            <wfw:comment>http://viveksharma.com/TECHLOG/comments/44.aspx</wfw:comment>
            <comments>http://viveksharma.com/TECHLOG/archive/2006/10/22/how-to-record-your-shell-session.aspx#feedback</comments>
            <wfw:commentRss>http://viveksharma.com/TECHLOG/comments/commentRss/44.aspx</wfw:commentRss>
            <trackback:ping>http://viveksharma.com/TECHLOG/services/trackbacks/44.aspx</trackback:ping>
        </item>
        <item>
            <title>Looking for feedback on PowerShell and Exchange</title>
            <category>PowerShell</category>
            <category>Exchange</category>
            <category>Work</category>
            <link>http://viveksharma.com/TECHLOG/archive/2006/10/20/looking-for-feedback-on-powershell-and-exchange.aspx</link>
            <description>Every once in a while its important to take a step back and see where we can improve---I already have a list of around ~150 things I'd like to improve in the Shell (Exchange and PowerShell), but I'd like to hear what you a) like about the shell and b) would like to see improved. You can leave comments, trackbacks on your own blogs, or mail me directly at (munging the address to defeat the spammers): vivek (at) thiswebpage'sdomainname.com   Here are some examples I found recently:
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://blogs.3sharp.com/Blog/deving/archive/2006/10/19/2300.aspx"&gt;Devin comments&lt;/a&gt; on how easy it is to move databases through cmdline and wonders why it isn't easy to move queues as well. &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://groups.google.com/group/microsoft.public.windows.powershell/browse_thread/thread/3083c79d24dabf24/36045ed7a911d7c4#36045ed7a911d7c4"&gt;Newsgroup commentary &lt;/a&gt;from a user on how much it rocks to use the Exchange cmdlets to do management, and why AD management from PowerShell isn't just as easy (I don't work for AD team, but rest assured, I'm still working hard on making this happen). &lt;/li&gt;
&lt;/ul&gt;
So let us know what you like (or like a lot) so we can continue making it better and what you would like to see improved / fixed / added so we can plan for our future releases or work up some cool community snippets (after all, that is one huge advantage of the shell). Remember, if you don't speak up, I can't hear you, and thus I can't do anything about any issues :)  &lt;img src="http://viveksharma.com/TECHLOG/aggbug/43.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vivek Sharma</dc:creator>
            <guid>http://viveksharma.com/TECHLOG/archive/2006/10/20/looking-for-feedback-on-powershell-and-exchange.aspx</guid>
            <pubDate>Fri, 20 Oct 2006 17:10:21 GMT</pubDate>
            <wfw:comment>http://viveksharma.com/TECHLOG/comments/43.aspx</wfw:comment>
            <comments>http://viveksharma.com/TECHLOG/archive/2006/10/20/looking-for-feedback-on-powershell-and-exchange.aspx#feedback</comments>
            <wfw:commentRss>http://viveksharma.com/TECHLOG/comments/commentRss/43.aspx</wfw:commentRss>
            <trackback:ping>http://viveksharma.com/TECHLOG/services/trackbacks/43.aspx</trackback:ping>
        </item>
    </channel>
</rss>
