<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>Joe Pruitt</title>
        <link>http://devcentral.f5.com/weblogs/Joe/Default.aspx</link>
        <description>A Software Architect's take on Network Security</description>
        <language>en-US</language>
        <copyright>Joe Pruitt</copyright>
        <generator>Subtext Version 2.1.1.1</generator>
        <image>
            <title>Joe Pruitt</title>
            <url>http://devcentral.f5.com/weblogs/images/RSS2Image.gif</url>
            <link>http://devcentral.f5.com/weblogs/Joe/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>X-Forwarded-For HTTP Module For IIS7, Source Included!</title>
            <category>DevCentral</category>
            <category>Development and General</category>
            <category>F5</category>
            <category>Microsoft Solutions</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/12/23/x-forwarded-for-http-module-for-iis7-source-included.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/XForwardedForHTTPModuleForIIS7SourceIncl_B6B9/iis7-highlight_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="iis7-highlight" border="0" alt="iis7-highlight" align="right" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/XForwardedForHTTPModuleForIIS7SourceIncl_B6B9/iis7-highlight_thumb.jpg" width="180" height="180" /&gt;&lt;/a&gt; For those who of you that are having problems with logging client addresses in their server logs because you are running your web servers behind a proxy of some sort, never fear, your solution is here.  For those that don't, I already discussed in my previous posts about what the X-Forwarded-For header is so feel free to &lt;a href="http://devcentral.f5.com/weblogs/Joe/archive/2009/08/19/x_forwarded_for_log_filter_for_windows_servers.aspx"&gt;click back into those to read about it&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Back in &lt;a href="http://devcentral.f5.com/weblogs/joe/archive/2005/09/23/1492.aspx"&gt;September, 2005&lt;/a&gt; I wrote and posted a 32-bit ISAPI filter that extracted the X-Forwarded-For header value and replaced the c-ip value (client ip) that is stored in the server logs.  Lots of folks have found this useful over time and I was eventually asked for a 64-bit version which I posted about in &lt;a href="http://devcentral.f5.com/weblogs/Joe/archive/2009/08/19/x_forwarded_for_log_filter_for_windows_servers.aspx"&gt;August, 2009&lt;/a&gt;.  &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The Question&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/XForwardedForHTTPModuleForIIS7SourceIncl_B6B9/question_mark_3d_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 10px 0px; display: inline; border-top: 0px; border-right: 0px" title="question_mark_3d" border="0" alt="question_mark_3d" align="left" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/XForwardedForHTTPModuleForIIS7SourceIncl_B6B9/question_mark_3d_thumb.jpg" width="31" height="60" /&gt;&lt;/a&gt; Well, it looks like it's time for the next generation for this filter…  I received an email from a colleague here at F5 telling me that his customer didn't want to deploy any more ISAPI filters in their IIS7 infrastructure.  IIS7 introduced the concept of &lt;a href="http://msdn.microsoft.com/en-us/library/bb757040.aspx"&gt;IIS Modules&lt;/a&gt; that are more integrated into the whole pipeline and was told that Microsoft is recommending folks move in that direction.  I was asked if I had plans to port my ISAPI filter into a HTTP Module.  &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The Answer&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Well, the answer was "probably not", but now it's changed to a "yes"!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The Solution&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In reading about IIS Module, I found that you can develop in managed (C#/VB) or Native (C++) code.  I loaded up the test C# project to see if I could get it working.  In a matter of minutes I had a working module that intercepted the event when logging occurs.  The only problem was that from managed code, I could find no way to actually modify the values that were passed to the logging processor.  This was a problem so I scrapped that and moved to a native C++ module.  After a little while of jumping through the documentation, I found the things I needed and pretty soon I had a working HTTP module that implemented the same functionality as the ISAPI filter.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Download&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The new Http Module hasn't had much testing done so please test it out before you roll it out into production.  I've made the source available as well if you find an issue and care to fix it.  Just make sure you pass back the fixes to me B-).&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://devcentral.f5.com/downloads/joe/F5XFFHttpModule.zip"&gt;X-Forwarded-For Http Module Binary Distribution&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://devcentral.f5.com/downloads/joe/F5XFFHttpModule-Source.zip"&gt;X-Forwarded-For Http Module Source Distribution&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The filter will require installation into IIS in order for you to be able to add it to your applications.  Both distributions include a readme.txt file with an example installation procedure.  Make sure you use the Release builds for the appropriate platform (x86 or x64) unless you are in need of some troubleshooting as the Debug build will dump a lot of data to a log file.  The module supports customizable headers if you are using something other than X-Forwarded-For.  Instructions for using that are in the readme.txt file as well.&lt;/p&gt;  &lt;p&gt;If you have any issues with using this, please let me know on this blog.  Keep in mind that this is an unsupported product, but I'll do my best to fix any issues that come up.  I'm even open to enhancements if you can think of any.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;p&gt;-Joe&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:0a275f92-b457-422b-b6cc-6c9509c1147b" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;,&lt;a href="http://technorati.com/tags/IIS7" rel="tag"&gt;IIS7&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Modules" rel="tag"&gt;Modules&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ISAPI" rel="tag"&gt;ISAPI&lt;/a&gt;,&lt;a href="http://technorati.com/tags/X-Forwarded-For" rel="tag"&gt;X-Forwarded-For&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/6248.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/12/23/x-forwarded-for-http-module-for-iis7-source-included.aspx</guid>
            <pubDate>Wed, 23 Dec 2009 21:00:22 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/6248.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/12/23/x-forwarded-for-http-module-for-iis7-source-included.aspx#feedback</comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/6248.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/6248.aspx</trackback:ping>
        </item>
        <item>
            <title>Introducing Posh-FourSquare - The PowerShell library for FourSquare.com</title>
            <category>DevCentral</category>
            <category>F5</category>
            <category>ISV Solutions</category>
            <category>Microsoft Solutions</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/10/05/introducing-posh-foursquare-the-powershell-library-for-foursquare.com.aspx</link>
            <description>&lt;p&gt;&lt;a href="file:///C:/Users/Joe/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles1983EFC0/PoshFourSquare[4].jpg"&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 10px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PoshFourSquare_thumb[2]" border="0" alt="PoshFourSquare_thumb[2]" align="right" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/IntroducingPoshFourSquareThePowerShe.com_B47A/PoshFourSquare_thumb%5B2%5D_75ba1340-4c63-46e3-bbfa-4bf70758520a.jpg" width="240" height="97" /&gt;&lt;/a&gt;Those who know me, can attest that I'm a early adopter when it comes to social networking systems.  The latest one I've been getting into lately is &lt;a href="http://www.foursquare.com"&gt;FourSquare.com&lt;/a&gt;.  &lt;/p&gt;  &lt;p&gt;FourSquare.com &lt;a href="http://foursquare.com/help/"&gt;describes itself&lt;/a&gt; as 50% friend finder, 30% social city guide, and 20% nightlife game.  They include ways to keep up with what your friends are doing as well as offering up some fun challenges to have you explore cities in different ways. &lt;/p&gt;  &lt;p&gt;Once I've played around with a social networking site for a bit, my next step is to see what kind of API's they have exposed and see if I can build my own app to integrate with the site.  It turns out that the FourSquare.com has exposed a public API in their &lt;a href="http://groups.google.com/group/foursquare-api/web/api-documentation"&gt;FourSquare-API Google Group&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;So, as I did with my &lt;a href="http://devcentral.f5.com/weblogs/Joe/archive/2008/12/30/introducing-poshtweet---the-powershell-twitter-script-library.aspx"&gt;Posh-Tweet&lt;/a&gt;, &lt;a href="http://devcentral.f5.com/weblogs/Joe/archive/2009/06/03/introducing-poshbing-ndash-the-powershell-library-for-microsoftrsquos-bing-search.aspx"&gt;Posh-Bing&lt;/a&gt;, &lt;a href="http://devcentral.f5.com/weblogs/Joe/archive/2009/06/17/introducing-poshtwitpic-ndash-use-powershell-to-post-your-images-to.aspx"&gt;Posh-TwitPic&lt;/a&gt;, and &lt;a href="http://devcentral.f5.com/weblogs/Joe/archive/2009/09/21/posh-delicious-the-powershell-library-for-the-delicious-bookmark-service.aspx"&gt;Posh-Delicious&lt;/a&gt; libraries, I went ahead and wrote a PowerShell library of functions to access the FourSquare APIs.&lt;/p&gt;  &lt;p&gt;The API is broken down into these categories:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;&lt;u&gt;Credentials&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;Get-FourSquare.Credentials - Get the credentials for your FourSquare.com account. &lt;/li&gt;      &lt;li&gt;Set-FourSquare.Credentials - Set the credentials for your FourSquare.com account. &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;&lt;strong&gt;&lt;u&gt;GEO Methods&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;Get-FourSquare.Citites - Returns a list of currently active cities. &lt;/li&gt;      &lt;li&gt;Check-FourSquare.City - When given a lat/long, returns the closest foursquare city. &lt;/li&gt;      &lt;li&gt;Switch-FourSquare.City - When given a valid foursquare cityid, changes the user's default city. &lt;/li&gt;      &lt;li&gt;Get-FourSquare.Checkins - Returns a list of recent checkins from friends. &lt;/li&gt;      &lt;li&gt;New-FourSquare.Checkin - Allows you to check-in to a place. &lt;/li&gt;      &lt;li&gt;Get-FourSquare.History - Returns a history of checkins for the authenticated user (across all cities). &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;&lt;strong&gt;&lt;u&gt;User Methods&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;Get-FourSquare.User - Returns profile information (badges, etc) for a given user. &lt;/li&gt;      &lt;li&gt;Get-FourSquare.Friends - Returns a list of the authenticated user's friends. &lt;/li&gt;      &lt;li&gt;Get-FourSquare.Venues - Returns a list of venues near the area specified or that match the search term. &lt;/li&gt;      &lt;li&gt;Get-FourSquare.Venue - Returns venue data, including mayorship, tips/to-dos and tags &lt;/li&gt;      &lt;li&gt;Add-FourSquare.Venue - Allows you to add a new venue. &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;&lt;strong&gt;&lt;u&gt;Tip Methods&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;Get-FourSquare.Tips - Returns a list of tips near the area specified. &lt;/li&gt;      &lt;li&gt;Add-FourSquare.Tip - Allows you to add a new tip or to-do at a venue. &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;&lt;strong&gt;&lt;u&gt;Other Methods&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;Get-FourSquare.Status - Returns the string "ok". &lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To use the API's you must first register on FourSquare.com.  The username and password you use to create the account will be used in this API with the Set-FourSquare.Credentials method.  After setting your credentials, you can call any of the other methods and start updating your status from the comfort of your PowerShell prompt.  The following example will register the functions in the current runspace, set the credentials, query the available citites, and then checkin at the Cafe next door for lunch.&lt;/p&gt;  &lt;pre class="code"&gt;PS C:\&amp;gt; . .\Posh-FourSquare.ps1&lt;br /&gt;PS C:\&amp;gt; Set-FourSquare.Credentials -user myuser -pass mypass&lt;br /&gt;PS C:\&amp;gt; Get-FourSquare.Cities | Format-Table
id   timezone                name                    geolat                  geolong
--   --------                ----                    ------                  -------
56   Europe/Amsterdam        Amsterdam               52.3789                 4.90067
46   America/New_York        Atlanta                 33.7525                 -84.3888
42   America/Chicago         Austin                  30.2669                 -97.7428
58   America/Denver          Black Rock City         40.7693                 -119.22
24   America/New_York        Boston                  42.3583                 -71.0603
32   America/Chicago         Chicago                 41.8858                 -87.6181
43   America/Chicago         Dallas / Fort Worth     32.7887                 -96.7676
25   America/Denver          Denver                  39.734                  -105.026
47   America/New_York        Detroit                 42.3333                 -83.0484
48   America/Chicago         Houston                 29.7594                 -95.3594
49   America/Los_Angeles     Las Vegas               36.1721                 -115.122
34   America/Los_Angeles     Los Angeles             34.0443                 -118.251
39   America/New_York        Miami                   25.7323                 -80.2436
51   America/Chicago         Minneapolis / St. Paul  44.9609                 -93.2642
22   America/New_York        New York City           40.7255                 -73.9983
33   America/New_York        Philadelphia            39.8694                 -75.2731
53   America/Phoenix         Phoenix                 33.4483                 -112.073
37   America/Los_Angeles     Portland                45.527                  -122.685
38   America/Los_Angeles     San Diego               32.7153                 -117.156
23   America/Los_Angeles     San Francisco           37.7587                 -122.433
41   America/Los_Angeles     Seattle                 47.6036                 -122.326
59   America/Vancouver       Vancouver               49.259515               -123.103867
31   America/New_York        Washington, DC          38.8964                 -77.0447
PS C:\&amp;gt; New-FourSquare.Checkin -venue "Urban Cafe" -shout "It's lunch time!"
message : OK! We've got you @ Urban Cafe.  This is your 4th checkin here!
id      : 1398385
created : Mon, 05 Oct 09 12:50:00 +0000
venue   : venue
mayor   : mayor&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Get The Source&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The full source for the script is available from my blog at &lt;a href="http://devcentral.f5.com/downloads/joe/powershell/Posh-FourSquare.ps1.txt"&gt;Posh-FourSquare.ps1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;p&gt;-Joe&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:008746c1-ca90-470b-a27d-6963be7c2df0" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;,&lt;a href="http://technorati.com/tags/PowerShell" rel="tag"&gt;PowerShell&lt;/a&gt;,&lt;a href="http://technorati.com/tags/FourSquare" rel="tag"&gt;FourSquare&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Automation" rel="tag"&gt;Automation&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Social+Networking" rel="tag"&gt;Social Networking&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/8043.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/10/05/introducing-posh-foursquare-the-powershell-library-for-foursquare.com.aspx</guid>
            <pubDate>Mon, 05 Oct 2009 19:50:42 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/8043.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/10/05/introducing-posh-foursquare-the-powershell-library-for-foursquare.com.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/8043.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/8043.aspx</trackback:ping>
        </item>
        <item>
            <title>Turn Your Podcast Into A Interactive Live Streaming Experience</title>
            <category>F5</category>
            <category>DevCentral</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/09/25/turn-your-podcast-into-a-interactive-live-streaming-experience.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/TheDevCentralLiveStreamingPodcastArchite_9647/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px 10px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/TheDevCentralLiveStreamingPodcastArchite_9647/image_thumb.png" width="120" height="119" /&gt;&lt;/a&gt; The folks here on the DevCentral team have been producing &lt;a href="http://devcentral.f5.com/weblogs/dcpodcast/Default.aspx"&gt;a weekly podcast&lt;/a&gt; for a while now.  Trying to keep our budget low, we opted to copy what some other podcasters were doing by making use of Skype for our audio communication and found a great little Skype add-on called &lt;a href="http://www.pamela.biz/en/"&gt;Pamela&lt;/a&gt; which creates high-quality WAV files from Skype conversations.  &lt;/p&gt;  &lt;p&gt;We created a dedicated Skype account on an old machine here in the office that will auto-record whenever that account is added to a conversation. We would occasionally have differences in audio levels between the callers so we incorporated the awesome &lt;a href="http://www.conversationsnetwork.org/levelator"&gt;The Levelator&lt;/a&gt; (from the Conversations Network) into the post production and we were set.&lt;/p&gt;  &lt;p&gt;A few weeks ago we broke through our one hundredth podcast and along with that milestone we decided to expand things a bit by making the podcast more interactive.  I spent a few weeks investigating how to best accomplish this and I ultimately decided on a setup.  I figured that I'd go ahead and share it with you all so you can see how we do it on our end.  Here's the high-level diagram:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/TheDevCentralLiveStreamingPodcastArchite_9647/podcast-architecture_4.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="podcast-architecture" border="0" alt="podcast-architecture" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/TheDevCentralLiveStreamingPodcastArchite_9647/podcast-architecture_thumb_1.jpg" width="640" height="480" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;I experimented with a mixing board but ended up with a software only solution that anyone can implement.  Everything besides the top left three items in the image were added to enable us to record our Skype podcast as well as stream it to UStream and allow callers with TalkShoe.  &lt;/p&gt;  &lt;h4&gt;&lt;strong&gt;The Components&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;Here's a list of the following components and how we used them.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Skype - &lt;a href="http://www.skype.com"&gt;http://www.skype.com&lt;/a&gt; - $0&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Skype, for those that don't know, is a software program that allows you to make video and voice calls across the internet.  Calls are free to other skype users and you can purchase the ability to call out to land line numbers or to get your own number so you can accept phone calls.&lt;/p&gt;    &lt;p&gt;We have a dedicated server with Skype and Pamela running to do the recording and each person on the podcast is connected through the main Skype instance on our publishing system.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Pamela Skype Recorder - &lt;a title="http://www.pamela.biz/en/" href="http://www.pamela.biz/en/"&gt;http://www.pamela.biz/en/&lt;/a&gt; - $24&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Pamela is an add-on program for Skype that will allow you to record your Skype conversations.  It features Skype call, video, and chat recording, answering machine, video mail, and skype based publishing.  We use it primarily for the ability to automatically record skype calls to either our skype account or our Skype dial-in number.  .WAV files are created and we are emailed when a recording is completed.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Windows Media Player - $0&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Windows Media Player is the default music/video player on the Windows platforms.  We use it to play background music into our skype and UStream sessions.  You could just as easily use another audio player as long as it supports the ability to customize which output audio device it uses.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Virtual Audio Cable - &lt;a title="http://software.muzychenko.net/eng/vac.html" href="http://software.muzychenko.net/eng/vac.html"&gt;http://software.muzychenko.net/eng/vac.html&lt;/a&gt; - $30&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;This little gem really saved the day with our setup.  There are various Mac programs that allow you to map audio streams from one program to another one but this is the best one I could find for Windows.  Virtual Audio Cable allows you to transfer audio (wave) streams between applications and/or devices.  In our setup, it allows us to map windows media player back into Skype and our multiple audio streams back into our live video processing through VidBlaster.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;VidBlaster - &lt;a title="http://vidblaster.com/" href="http://vidblaster.com/"&gt;http://vidblaster.com/&lt;/a&gt; - $0&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;VidBlaster is a powerful, economic way to record, stream, and produce high quality videos.  VidBlaster comes in three versions: Home, Pro, and Studio with the only difference being the number of "modules" you can use at one time.  What's best about this product is that you can use it for free if you can live with a "VidBlaster" add in the top right corner of your video stream.  We'll likely put the couple hundred bucks down for the Pro version but as of now it hasn't costed us a cent.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Adobe Flash Media Encoder - &lt;a title="http://www.adobe.com/products/flashmediaserver/flashmediaencoder/" href="http://www.adobe.com/products/flashmediaserver/flashmediaencoder/"&gt;http://www.adobe.com/products/flashmediaserver/flashmediaencoder/&lt;/a&gt; - $0&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The Adobe Flash Media Encoder allows you to capture live audio and video while streaming it in real time to a flash media server.  While we could stream directly from VidBlaster to UStream, the quality is not as good as moving some of the processing down to the client.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;UStream - &lt;a href="http://www.ustream.tv"&gt;http://www.ustream.tv&lt;/a&gt; - $0&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;UStream is the live interactive video broadcast platform that enables anyone with a camera (or VidBlaster!) and an internet connection to quickly and easily broadcast to a global audience of unlimited size.  Best of all, it's free!&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;TalkShoe - &lt;a href="http://www.talkshoe.com"&gt;http://www.talkshoe.com&lt;/a&gt; - $0&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;We struggled for a while trying to figure out the best way to include a "live" audience in our recording.  TalkShoe is a service that enables anyone to easily create, join, or listen to live interactive discussions, conversations, podcasts, and audioblogs.  It fit the bill of just what we needed and since we already had our Skype conversation going, bolting on TalkShoe was as simple as adding the conference number to our group Skype conversation.  TalkShoe also has some pretty nifty user controls allowing the moderator to control muting of each of the participants.  Another great free service!&lt;/p&gt; &lt;/blockquote&gt;  &lt;h4&gt;&lt;strong&gt;Production Setup Walkthrough&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;Here's the steps I go through in preparation for our weekly podcast.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create 3 Virtual Audio Cables with the Virtual Audio Cable Control Panel (VAC #1, VAC #2, VAC #3)&lt;/li&gt;    &lt;li&gt;Start up 2 instances of the Virtual Audio Cable Audio Repeater.  Set the first one (R1) from VAC #3 to VAC #1 and the second from VAC #3 to VAC #2.&lt;/li&gt;    &lt;li&gt;Start and login to Skype.  Go into the Audio settings and change the audio input to VAC #1 and the output to VAC #2.&lt;/li&gt;    &lt;li&gt;Start Windows Media Player and change the speaker device settings to output to VAC #3.&lt;/li&gt;    &lt;li&gt;Start VidBlaster and setup various screen captures, set the video resolution to 640x480 and the frame rate to 15fps (much higher than that drives the CPU way up).  Finally click "Start" on the Streamer module.&lt;/li&gt;    &lt;li&gt;Start the Adobe Flash Media Encoder.  Load the stream configuration that you can download from your UStream show's advanced settings and then Select VidBlaster for the Video Device and "Line 2 (Virtual Audio Cable)" (ie. VAC #2) for the Audio device.  Click "Start" to begin streaming.&lt;/li&gt;    &lt;li&gt;Login to our UStream.tv account and click "Broadcast Now" for your show.  Another browser window will come up detecting the media stream.  Click "Start Broadcast" to start the stream and click "Start Record" to being recording your stream on the server.&lt;/li&gt;    &lt;li&gt;Bring up the Skype window and create a conference with the podcast members including our account that auto-records the conversations.  Then finally, call the TalkShoe conference bridge and initiate the meeting on their side.&lt;/li&gt;    &lt;li&gt;Login to the TalkShoe account on their website and click the option to join the meeting.  When the admin console is loaded, you can optionally select "Record" from the top left to have TalkShoe make an alternate recording.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;At this point we are recording our Skype session in audio, UStream is recording the video stream and TalkShoe is recording a secondary audio recording.  At this point, I cue up the intro music in Windows Media Player and start into the podcast.&lt;/p&gt;  &lt;p&gt;When we are finished, I reverse the process above by stopping and saving the various recordings.  I take our Pamela based recording, run it through The Levelator, convert it to a mp3 with Audacity, edit the ID3 tags, and publish it to our media server.  At this point, the blog post is created and we are done for the week.&lt;/p&gt;  &lt;h4&gt;&lt;strong&gt;Reflections&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;There are a few things that are still causing some issues.  The main issue is that of horsepower on my media system.  The desktop I'm using for all of this was not meant to run these types of CPU intensive applications.  While it works, my dual-core CPU system is hovering at 99-100% CPU usage during the podcast which is a bit worrisome.  Depending on the success of the podcast, we may invest in a new desktop to run this on.  But, seeing how we've spent well under $100 for the entire software suite, I don't think we'll have much trouble justifying it!&lt;/p&gt;  &lt;p&gt;Hopefully this helps some of you out there with some ideas and I'd love to hear feedback on how I could do things better!&lt;/p&gt;  &lt;p&gt;-Joe&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:9afdf7c5-e429-48fa-861a-be983c334cbc" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Podcast" rel="tag"&gt;Podcast&lt;/a&gt;,&lt;a href="http://technorati.com/tags/UStream" rel="tag"&gt;UStream&lt;/a&gt;,&lt;a href="http://technorati.com/tags/VidBlaster" rel="tag"&gt;VidBlaster&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Adobe" rel="tag"&gt;Adobe&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/8025.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/09/25/turn-your-podcast-into-a-interactive-live-streaming-experience.aspx</guid>
            <pubDate>Fri, 25 Sep 2009 21:24:35 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/8025.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/09/25/turn-your-podcast-into-a-interactive-live-streaming-experience.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/8025.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/8025.aspx</trackback:ping>
        </item>
        <item>
            <title>Introducing Posh-Delicious - The PowerShell Library For The Delicious Bookmark Service</title>
            <category>DevCentral</category>
            <category>F5</category>
            <category>Microsoft Solutions</category>
            <category>Monitoring/Management</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/09/21/posh-delicious-the-powershell-library-for-the-delicious-bookmark-service.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/IntroducingPoshDeliciousThePowerShellLib_7B21/poshdelicious_2.jpg"&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 10px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="poshdelicious" border="0" alt="poshdelicious" align="right" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/IntroducingPoshDeliciousThePowerShellLib_7B21/poshdelicious_thumb.jpg" width="119" height="120" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;For those of you who don't know what Delicious.com is (yes it's the same as del.icio.us), I'll just borrow their overview from their &lt;a href="http://delicious.com/help/getStarted"&gt;getting started page&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&lt;a href="http://delicious.com"&gt;Delicious&lt;/a&gt; is a social bookmarking service that allows you to tag, save, manage, and share Web pages all in one place.  With emphasis on the power of the community, Delicious greatly improves how people discover, remember and share on the Internet.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Here on &lt;a title="DevCentral.f5.com" href="http://devcentral.f5.com" rel=""&gt;DevCentral&lt;/a&gt;, when new content is added, we regularly add it to various social networking sites, including Delicious.  There are some great browser plugins that help you with sharing content and I regularly use the &lt;a href="http://www.shareaholic.com/"&gt;Shareaholic Firefox plug-in&lt;/a&gt;.  But, it's still too much manual work for me so I figured I'd try to automate it a bit.&lt;/p&gt;  &lt;p&gt;I previously published a PowerShell library for Twitter (&lt;a href="http://devcentral.f5.com/weblogs/Joe/archive/2008/12/30/introducing-poshtweet---the-powershell-twitter-script-library.aspx"&gt;PoshTweet&lt;/a&gt;), for TwitPic (&lt;a href="http://devcentral.f5.com/weblogs/Joe/archive/2009/06/17/introducing-poshtwitpic-ndash-use-powershell-to-post-your-images-to.aspx"&gt;PoshTwitPic&lt;/a&gt;) as well as one for the Bing Search API (&lt;a href="http://devcentral.f5.com/weblogs/Joe/archive/2009/06/03/introducing-poshbing-ndash-the-powershell-library-for-microsoftrsquos-bing-search.aspx"&gt;PoshBing&lt;/a&gt;) so I figured I'd build on those and write one for Delicious.  The Delicious API documentation is defined &lt;a href="http://delicious.com/help/api"&gt;here&lt;/a&gt;.  &lt;/p&gt;  &lt;p&gt;The API is broken down into the following functions:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;&lt;u&gt;Credentials&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;&lt;em&gt;Set-Delicious.Credentials&lt;/em&gt; - set the client credentials for the delicious.com account. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;Get-Delicious.Credentials&lt;/em&gt; - get the client credentials for the delicious.com account. &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;&lt;strong&gt;&lt;u&gt;Posts&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#posts_update"&gt;Get-Delicious.PostsUpdate&lt;/a&gt;&lt;/em&gt; - Returns the last update time for the user, as well as the number of new items in the user's inbox since it was last visited. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#posts_add"&gt;Add-Delicious.Post&lt;/a&gt;&lt;/em&gt; - Add a post to delicious. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#posts_delete"&gt;Delete-Delicious.Post&lt;/a&gt;&lt;/em&gt; - Delete a post from delicious. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#posts_get"&gt;Get-Delicious.Posts&lt;/a&gt;&lt;/em&gt; - Returns one or more posts on a single day matching the arguments. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#posts_dates"&gt;Get-Delicious.PostDates&lt;/a&gt;&lt;/em&gt; - Returns a list of dates with the number of posts at each date. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#posts_recent"&gt;Get-Delicious.RecentPosts&lt;/a&gt;&lt;/em&gt; - Returns a list of the most recent posts, filtered by argument. Maximum 100. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#posts_all"&gt;Get-Delicious.AlLPosts&lt;/a&gt;&lt;/em&gt; - Returns all posts. Please use sparingly. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#posts_all_hashes"&gt;Get-Delicious.PostHashes&lt;/a&gt;&lt;/em&gt; - Returns a change manifest of all posts. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#posts_suggest"&gt;Get-Delicious.PostSuggestions&lt;/a&gt;&lt;/em&gt; - Returns a list of popular tags, recommended tags and network tags for a user. &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;&lt;strong&gt;&lt;u&gt;Tags&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#tags_get"&gt;Get-Delicious.Tags&lt;/a&gt;&lt;/em&gt; - Returns a list of tags and number of times used by a user. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#tags_delete"&gt;Delete-Delicious.Tags&lt;/a&gt;&lt;/em&gt; - Delete an existing tag. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#tags_rename"&gt;Rename-Delicious.Tags&lt;/a&gt;&lt;/em&gt; - Rename an existing tag with a new tag name. &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;&lt;strong&gt;&lt;u&gt;Tag Bundles&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#tags_bundles_all"&gt;Get-Delicious.TagBundles&lt;/a&gt;&lt;/em&gt; - Retrieve all of a user's bundles &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#tags_bundles_set"&gt;Set-Delicious.TagBundles&lt;/a&gt;&lt;/em&gt; - Assign a set of tags to a single bundle, wipes away previous settings for bundle. &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;a href="http://delicious.com/help/api#tags_bundles_delete"&gt;Delete-Delicious.TagBundles&lt;/a&gt;&lt;/em&gt; - Delete a bundle. &lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The usage is fairly straight forward.  First you must load the functions into your runspace.  This is most easily done by "dot sourcing" the script.  Then you will call the Set-Delicious.Credentials function with your delicious credentials.  At this point you should be all set to submit bookmarks with PowerShell.  The following code creates a new bookmark for my blog with the Add-Delicious.Post function and then retrieves the entries from the last day you posted with Get-Delicious.Posts.&lt;/p&gt;  &lt;pre class="code"&gt;PS C:\&amp;gt; . .\Posh-Delicious.ps1&lt;br /&gt;PS C:\&amp;gt; Set-Delicious.Credentials -user "joeuser" -pass "joepass"&lt;br /&gt;PS C:\&amp;gt; Add-Delicious.Post -url "&lt;a href="http://devcentral.f5.com/weblogs/joe&amp;quot;"&gt;http://devcentral.f5.com/weblogs/joe"&lt;/a&gt; -extended "An awesome blog!" -tags "weblogs"&lt;br /&gt;ResultCode&lt;br /&gt;----------&lt;br /&gt;done&lt;br /&gt;PS C:\&amp;gt; Get-Delicious.Posts&lt;br /&gt;href        : &lt;a title="http://devcentral.f5.com/weblogs/joe" href="http://devcentral.f5.com/weblogs/joe"&gt;http://devcentral.f5.com/weblogs/joe&lt;/a&gt;&lt;br /&gt;hash        : ed2760db92010aad2c6a1008afa6ce2b&lt;br /&gt;description : &lt;a title="http://devcentral.f5.com/weblogs/joe" href="http://devcentral.f5.com/weblogs/joe"&gt;http://devcentral.f5.com/weblogs/joe&lt;/a&gt;&lt;br /&gt;tag         : weblogs&lt;br /&gt;time        : 2009-09-21T15:34:06Z&lt;br /&gt;extended    : An awesome blog!&lt;br /&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Get The Source&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want to automate the posting of links to Delicious, feel free to check out the source that can be downloaded from here: &lt;a href="http://devcentral.f5.com/downloads/joe/powershell/Posh-Delicious.Ps1.txt"&gt;Posh-Delicious.ps1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;p&gt;-Joe&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:f1bc00dd-4b20-4d0e-9929-04e204820536" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;,&lt;a href="http://technorati.com/tags/PowerShell" rel="tag"&gt;PowerShell&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Delicious" rel="tag"&gt;Delicious&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Bookmarks" rel="tag"&gt;Bookmarks&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Automation" rel="tag"&gt;Automation&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/6122.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/09/21/posh-delicious-the-powershell-library-for-the-delicious-bookmark-service.aspx</guid>
            <pubDate>Mon, 21 Sep 2009 15:45:59 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/6122.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/09/21/posh-delicious-the-powershell-library-for-the-delicious-bookmark-service.aspx#feedback</comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/6122.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/6122.aspx</trackback:ping>
        </item>
        <item>
            <title>Listen To DevCentral Live!</title>
            <category>F5</category>
            <category>DevCentral</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/27/listen-to-devcentral-live.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/live"&gt;&lt;img style="margin: 0px 0px 10px 10px" align="right" src="http://devcentral.f5.com/podcast/DC4-Live2.jpg" /&gt;&lt;/a&gt;This week marks a major milestone for us here at &lt;a title="DevCentral.f5.com" href="http://devcentral.f5.com" rel=""&gt;DevCentral&lt;/a&gt;: we have reached our 100th weekly Podcast!  To celebrate, we are going to try some new formats and the first one of these is user interaction!  Starting today, we will be streaming our podcasts live on UStream.tv so you can listen in while we are recording.  Don't worry, we will still be archiving the audio versions on DevCentral, iTunes, etc.&lt;/p&gt;  &lt;p&gt;UStream.tv gives us a few benefits.  First, we can broadcast video along with the audio.  At this point we are unable to syndicate everyone's webcam from our team but this gives us some options for the future.  Another benefit here is that you are welcome to comment in our chat session as well if you feel the need to chime in or ask a question.  &lt;/p&gt;  &lt;p&gt;We really want to move our podcast into more of a "virtual round table" with the DevCentral community and this is our first step.  We are always looking for guests as well so if you feel like you have something to share with the community, we'd love to have you on.  Just leave a comment on this blog and we'll get back to you to schedule you in.&lt;/p&gt;  &lt;p&gt;We've setup a permanent link that will get you to our live show, including previous recordings).&lt;/p&gt; &lt;center&gt;   &lt;p&gt;     &lt;/p&gt;&lt;table border="0"&gt;&lt;tbody&gt;         &lt;tr&gt;           &lt;td align="center"&gt;&lt;a href="http://devcentral.f5.com/live"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Live_Logo" border="0" alt="Live_Logo" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/ListenToDevCentralLive_99EF/Live_Logo_3.jpg" width="120" height="115" /&gt;&lt;/a&gt;&lt;/td&gt;         &lt;/tr&gt;          &lt;tr&gt;           &lt;td&gt;&lt;a href="http://devcentral.f5.com/live"&gt;http://devcentral.f5.com/live&lt;/a&gt;               &lt;p /&gt;           &lt;/td&gt;         &lt;/tr&gt;       &lt;/tbody&gt;&lt;/table&gt;    &lt;/center&gt;  &lt;p&gt;We record our podcast on Thursday's at 2PM PST.  I'm sure as the popularity grows on this, we'll expand our times so make sure you "follow" us on our UStream.tv channel &lt;a title="http://www.ustream.tv/channel/dcpodcast" href="http://www.ustream.tv/channel/dcpodcast"&gt;http://www.ustream.tv/channel/dcpodcast&lt;/a&gt; for any upcoming recordings.&lt;/p&gt;  &lt;p&gt;-Joe&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:1c09c18d-4437-45bc-aa1b-fd18b674c7a0" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Podcast" rel="tag"&gt;Podcast&lt;/a&gt;,&lt;a href="http://technorati.com/tags/UStream" rel="tag"&gt;UStream&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/6075.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/27/listen-to-devcentral-live.aspx</guid>
            <pubDate>Thu, 27 Aug 2009 17:57:25 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/6075.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/27/listen-to-devcentral-live.aspx#feedback</comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/6075.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/6075.aspx</trackback:ping>
        </item>
        <item>
            <title>The Encryption Dance</title>
            <category>DevCentral</category>
            <category>F5</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/20/the-encryption-dance.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/media/audio/20090820-TheEncryptionDance.mp3"&gt; &lt;/a&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/TheEncryptionDance_1307E/safety-dance_2.jpg"&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 10px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="safety-dance" border="0" alt="safety-dance" align="right" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/TheEncryptionDance_1307E/safety-dance_thumb.jpg" width="120" height="160" /&gt;&lt;/a&gt;Ok, so &lt;a href="http://devcentral.f5.com/weblogs/psilva"&gt;Pete&lt;/a&gt; did his best Weird Al impersonation the other day by throwing up his take-off on Men Without Hat’s “Safety Dance”.  His version “&lt;a href="http://devcentral.f5.com/weblogs/psilva/archive/2009/08/14/the-encryption-dance.aspx"&gt;Encryption Dance&lt;/a&gt;” is &lt;strong&gt;brilliant&lt;/strong&gt; and we decided to highlight it in &lt;a href="http://devcentral.f5.com/weblogs/dcpodcast/archive/2009/08/20/devcentral-weekly-roundup-episode-99-cloud-frown.aspx"&gt;this weeks podcast&lt;/a&gt; with a challenge out to Pete to give us a live recording of his parody.&lt;/p&gt;  &lt;p&gt;Well, it didn’t take Pete long to answer to our call and he sent along his recording of “Encryption Dance”.   For those who aren’t familiar with Men Without Hats, here’s their Safety Dance Video for you to check out first.&lt;/p&gt;  &lt;p align="center"&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/HcOZ6xFxJqg&amp;amp;hl=en&amp;amp;fs=1&amp;amp;" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;embed src="http://www.youtube.com/v/HcOZ6xFxJqg&amp;amp;hl=en&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344" /&gt;&lt;/object&gt;&lt;/p&gt;  &lt;p&gt;And here’s Pete’s “Encryption Dance” performed A Cappella".&lt;/p&gt; &lt;center&gt;   &lt;div id="encryptiondanceplayer" align="center" width="100%"&gt;&lt;a href="http://www.macromedia.com/go/getflashplayer"&gt;Get the Flash Player&lt;/a&gt; to see this player. &lt;/div&gt;   &lt;script language="javascript"&gt;&lt;!--
generateMP3Player("encryptiondanceplayer", "20090820-TheEncryptionDance.mp3");
//--&gt;&lt;/script&gt;&lt;/center&gt;  &lt;p&gt;I know which one I prefer!  Thanks Pete!!!&lt;/p&gt;  &lt;p&gt;-Joe&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:50b77051-dcc9-4ff7-8000-4c41ee5bd3c5" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Safety+Dance" rel="tag"&gt;Safety Dance&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Encryption+Dance" rel="tag"&gt;Encryption Dance&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Pete+Silva" rel="tag"&gt;Pete Silva&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/6062.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/20/the-encryption-dance.aspx</guid>
            <pubDate>Fri, 21 Aug 2009 04:39:49 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/6062.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/20/the-encryption-dance.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/6062.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/6062.aspx</trackback:ping>
        </item>
        <item>
            <title>X-Forwarded-For Log Filter for Windows Servers</title>
            <category>BIG-IP</category>
            <category>DevCentral</category>
            <category>Development and General</category>
            <category>F5</category>
            <category>Microsoft Solutions</category>
            <category>Monitoring/Management</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/19/x_forwarded_for_log_filter_for_windows_servers.aspx</link>
            <description>&lt;p&gt;For those that don't know what X-Forwarded-For is, then you might as well close your browser because this post likely will mean nothing to you…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A Little Background&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Now, if you are still reading this, then you likely are having issues with determining the origin client connections to your web servers.  When web requests are passed through proxies, load balancers, application delivery controllers, etc, the client no longer has a direct connection with the destination server and all traffic looks like it's coming from the last server in the chain.  In the following diagram, Proxy2 is the last hop in the chain before the request hits the destination server.  Relying on connection information alone, the server thinks that all connections come from Proxy2, not from the Client that initiated the connection.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/XForwardedForLogFilterforWindowsServers_980C/TrafficFlow.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="TrafficFlow" border="0" alt="TrafficFlow" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/XForwardedForLogFilterforWindowsServers_980C/TrafficFlow_thumb.jpg" width="587" height="125" /&gt;&lt;/a&gt; The only one in the chain here who knows who the client really is (as determined by it's client IP Address, is Proxy1.  The problem is that application owners rely on source client information for many reasons ranging from analyzing client demographics to targeting Denial of Service attacks.&lt;/p&gt;  &lt;p&gt;That's where the &lt;a href="http://en.wikipedia.org/wiki/X-Forwarded-For"&gt;X-Forwarded-For&lt;/a&gt; header comes in.  It is non-RFC standard HTTP request header that is used for identifying the originating IP address of a client connecting to a web server through a proxy.  The format of the header is:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;X-Forwarded-For: client, proxy1, proxy, …&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;X-Forwarded-For header logging is supported in Apache (with mod_proxy) but Microsoft IIS does not have a direct way to support the translation of the X-Forwarded-For value into the client ip (c-ip) header value used in its webserver logging.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/joe/archive/2005/09/23/1492.aspx"&gt;Back in September, 2005&lt;/a&gt; I wrote an ISAPI filter that can be installed within IIS to perform this transition.  This was primarily for F5 customers but I figured that I might as well release it into the wild as others would find value out of it.&lt;/p&gt;  &lt;p&gt;Recently folks have asked for 64 bit versions (especially with the release of Windows 2008 Server).  This gave me the opportunity to brush up on my C skills.  In addition to building targets for 64 bit windows, I went ahead and added a few new features that have been asked for.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Proxy Chain Support&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The original implementation did not correctly parse the "client, proxy1, proxy2,…" format and assumed that there was a single IP address following the X-Forwarded-For header.  I've added code to tokenize the values and strip out all but the first token in the comma delimited chain for inclusion in the logs.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Header Name Override&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Others have asked to be able to change the header name that the filter looked for from "X-Forwarded-For" to some customized value.  In some cases they were using the X-Forwarded-For header for another reason and wanted to use iRules to create a new header that was to be used in the logs.  I implemented this by adding a configuration file option for the filter.  The filter will look for a file named F5XForwardedFor.ini in the same directory as the filter with the following format:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;[SETTINGS]     &lt;br /&gt;HEADER=Alternate-Header-Name&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The value of "Alternate-Header-Name" can be changed to whatever header you would like to use.  &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Download&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I've updated the original distribution file so that folks hitting my previous blog post would get the updates.  The following zip file includes 32 and 64 bit release versions of the F5XForwardedFor.dll that you can install under IIS6 or IIS7.&lt;a href="http://devcentral.f5.com/downloads/codeshare/F5XForwardedFor.zip"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="download_button" border="0" alt="download_button" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/XForwardedForLogFilterforWindowsServers_980C/download_button_6.jpg" width="240" height="160" /&gt;&lt;/a&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;  &lt;p /&gt;  &lt;p&gt;Follow these steps to install the filter.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Download and unzip the F5XForwardedFor.zip distribution.&lt;/li&gt;    &lt;li&gt;Copy the F5XForwardedFor.dll file from the x86\Release or x64\Release directory (depending on your platform) into a target directory on your system.  Let's say C:\ISAPIFilters.&lt;/li&gt;    &lt;li&gt;Ensure that the containing directory and the F5XForwardedFor.dll file have read permissions by the IIS process.  It's easiest to just give full read access to everyone.&lt;/li&gt;    &lt;li&gt;Open the IIS Admin utility and navigate to the web server you would like to apply it to.&lt;/li&gt;    &lt;li&gt;For IIS6, Right click on your web server and select Properties.  Then select the "ISAPI Filters" tab.  From there click the "Add" button and enter "F5XForwardedFor" for the Name and the path to the file "c:\ISAPIFilters\F5XForwardedFor.dll" to the Executable field and click OK enough times to exit the property dialogs.  At this point the filter should be working for you.  You can go back into the property dialog to determine whether the filter is active or an error occurred.&lt;/li&gt;    &lt;li&gt;For II7, you'll want to select your website and then double click on the "ISAPI Filters" icon that shows up in the Features View.  In the Actions Pane on the right select the "Add" link and enter "F5XForwardedFor" for the name and "C:\ISAPIFilters\F5XForwardedFor.dll" for the Executable.  Click OK and you are set to go.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I'd love to hear feedback on this and if there are any other feature request, I'm wide open to suggestions. The source code is included in the download distribution so if you make any changes yourself, let me know!&lt;/p&gt;  &lt;p&gt;Good luck and happy filtering!&lt;/p&gt;  &lt;p&gt;-Joe&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:8757b3f8-6583-4158-8dc5-6d987fa27ca9" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;,&lt;a href="http://technorati.com/tags/X-Forwarded-For" rel="tag"&gt;X-Forwarded-For&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Proxy" rel="tag"&gt;Proxy&lt;/a&gt;,&lt;a href="http://technorati.com/tags/IIS" rel="tag"&gt;IIS&lt;/a&gt;,&lt;a href="http://technorati.com/tags/IIS7" rel="tag"&gt;IIS7&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Windows" rel="tag"&gt;Windows&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Win64" rel="tag"&gt;Win64&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/8014.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/19/x_forwarded_for_log_filter_for_windows_servers.aspx</guid>
            <pubDate>Wed, 19 Aug 2009 18:16:18 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/8014.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/19/x_forwarded_for_log_filter_for_windows_servers.aspx#feedback</comments>
            <slash:comments>23</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/8014.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/8014.aspx</trackback:ping>
        </item>
        <item>
            <title>Big Prizes and Accolades Await You With The 2009 iRule. Do You? Contest</title>
            <category>BIG-IP</category>
            <category>DevCentral</category>
            <category>Development and General</category>
            <category>F5</category>
            <category>iRules</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/12/2009_irule_do_you_contest.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/BigPrizesandAccoladesAwaitY.DoYouContest_B371/iRuleDoYouv1_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="iRuleDoYouv1" border="0" alt="iRuleDoYouv1" align="right" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/BigPrizesandAccoladesAwaitY.DoYouContest_B371/iRuleDoYouv1_thumb.jpg" width="240" height="121" /&gt;&lt;/a&gt;Come one, come all to our third edition of the &lt;a href="http://devcentral.f5.com/Default.aspx?tabid=156"&gt;iRule. Do You? Contest&lt;/a&gt;.  For those that don't know, an iRule is F5's embedded packet scripting language allowing you to gain full control over how your applications flow across the network.&lt;/p&gt;  &lt;p&gt;There are hundreds of iRules in our &lt;a href="http://devcentral.f5.com/wiki/default.aspx/iRules/CodeShare.html"&gt;iRule CodeShare&lt;/a&gt; and thousands of them running out in the wild.  It's time for you iRule geeks out there to show us, and our community, your stuff.  Whether you are an avid developer or just someone who wants to dabble in new technologies, this contest is for you.&lt;/p&gt;  &lt;p&gt;The rules are pretty simple:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="lucida con"&gt;01  &lt;/font&gt;&lt;a href="http://devcentral.f5.com/Default.aspx?tabid=157"&gt;&lt;font size="2" face="lucida con"&gt;Read the contest rules&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="lucida con"&gt;.       &lt;br /&gt;02  Write a working &lt;/font&gt;&lt;a href="http://devcentral.f5.com/wiki/Default.aspx/iRules.HomePage"&gt;&lt;font size="2" face="lucida con"&gt;iRule&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="lucida con"&gt;.       &lt;br /&gt;03  Tell us about it by submitting it on our &lt;/font&gt;&lt;a href="http://devcentral.f5.com/Default.aspx?tabid=158"&gt;&lt;font size="2" face="lucida con"&gt;Contest Entry form&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="lucida con"&gt;.       &lt;br /&gt;04  Goto 02 as many times as you want.        &lt;br /&gt;05  Sit back and wait for the judges to pick you as a winner and receive some awesome prizes.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;We are judging on &lt;a href="http://devcentral.f5.com/Default.aspx?tabid=157"&gt;several criteria&lt;/a&gt; so don't worry if your iRule isn't the most complex.  Sometimes it's the simplest ones that provide the most value that will ultimately make it to the winners circle.  The entries will be judged on &lt;strong&gt;Business Merit &lt;/strong&gt;(innovation, business value, and breadth of applicability) as well as &lt;strong&gt;Technical Merit&lt;/strong&gt; (Elegance, Potential for extensibility, and Cool factor) so there are lots of ways to win.&lt;/p&gt;  &lt;p&gt;As if the accolades of winning are not enough, we've sweetened the pot with some &lt;a href="http://devcentral.f5.com/Default.aspx?tabid=2190"&gt;pretty awesome prizes&lt;/a&gt;, if I do say for myself.  How's a 17" MacBook Pro sound?  No, well then, how about a Canon 5D Mark II?  If you win the gold, you'll be taking one of these home with you.  There are also plenty of consolation prizes including a MacBook Air, Apple 30" Cinema display, HP TouchSmart, Amazon Kindle DX, ASUS EeePC, XBox 360, and even a bunch of iRule branded Flip Mino HD video cameras (I've got to get me one of these!).  &lt;/p&gt;  &lt;p&gt;So, hurry up and get started &lt;a href="http://devcentral.f5.com/Default.aspx?tabid=158"&gt;submitting your iRules&lt;/a&gt;!&lt;/p&gt;  &lt;p&gt;-Joe&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:10ace7e2-3ffc-4ee6-90f1-0e18e3a25a95" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;,&lt;a href="http://technorati.com/tags/iRules" rel="tag"&gt;iRules&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Contest" rel="tag"&gt;Contest&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/6043.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/12/2009_irule_do_you_contest.aspx</guid>
            <pubDate>Wed, 12 Aug 2009 19:46:13 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/6043.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/12/2009_irule_do_you_contest.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/6043.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/6043.aspx</trackback:ping>
        </item>
        <item>
            <title>There&amp;rsquo;s a New iRule Editor in Town</title>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/05/theres-a-new-irule-editor-in-town.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/TheresaNewiRuleEditorinTown_CF81/AboutTheiRuleEditor_2.jpg"&gt;&lt;img width="207" height="240" border="0" align="right" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/TheresaNewiRuleEditorinTown_CF81/AboutTheiRuleEditor_thumb.jpg" alt="AboutTheiRuleEditor" title="AboutTheiRuleEditor" style="border: 0px none ; margin: 0px 0px 10px 10px; display: inline;" /&gt;&lt;/a&gt;It’s been a while since I posted an update for the &lt;a href="http://devcentral.f5.com/Default.aspx?tabid=66"&gt;iRule Editor&lt;/a&gt; so I figured I’d spend some time this week polishing off some of the bugs and enhancements reported on the &lt;a href="http://devcentral.f5.com/Default.aspx?tabid=53&amp;amp;view=topics&amp;amp;forumid=22"&gt;iRule Editor forum&lt;/a&gt; over the past year or so.&lt;/p&gt;
&lt;p&gt;So, I can go on and on about the history, but I figure you all just want to bypass that and go straight to what’s been fixed/added since the last version.  We’ll here’s what I’ve got for you in the latest v0.10.0.0 distribution that I released today.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;FIX:  Hyperlink click crashes iRule Editor&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This was reported in &lt;a href="http://devcentral.f5.com/Default.aspx?tabid=53&amp;amp;forumid=22&amp;amp;postid=30906&amp;amp;view=topic"&gt;this thread&lt;/a&gt; titled &lt;a href="http://devcentral.f5.com/Default.aspx?tabid=53&amp;amp;forumid=22&amp;amp;postid=30906&amp;amp;view=topic"&gt;iRule Crash&lt;/a&gt;.  In the text editor window, the iRule Editor has some special tokens that allow you to click on them and launch a browser to take you to the appropriate documentation webpage for that token.  On some windows system, the registry settings for the default browser were not where I expected them to be.  I removed this registry lookup and relied on the system to determine for me the default browser application.  This works much nicer now!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;FIX: Disable auto-configuration saving if the user is in a roll that doesn’t allow it.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Manager roles do now have access to the ConfigSync.save_configuration() iControl method to flush the running configuration to disk.  In the past, an error dialog would display on every save command.  The iRule Editor will now assume you have privileges to do so and if it encounters an error saving the configuration, it will use a new “Auto-Save” flag configurable in the “Tools.BIG-IP Config” menu item.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;FIX: iRule Property Virtual Server assignment not persisted to disk.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For some reason, I omitted the call to ConfigSync.save_configuration() on the iRule Property dialog when assigning virtual servers.  Now, on an OK in the dialog, a save operation occurs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ENH: New “Tools.BIG-IP Config” menu to control BIG-IP configuration saving.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On this menu, you can trigger a manual config save and control the auto-save option.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ENH: HTTP Proxy Server support for Connection Dialog&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As implemented in the iControl Assembly, the connection dialog now supports a HTTP proxy for iControl connections to your BIG-IP’s management port.  I had a hard time testing this so please let me know if it works B-).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ENH: Application Self Updates&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Since removing the ClickOnce deployment from the iRule Editor setup, there hasn’t been an easy way to check for new versions of the Editor.  With this release, there is an new program installed with the Editor called iRulerUpdater.exe that is called by the iRule Editor’s “Check For Updates” command.  You should never see this unless a new update is available on the site.  BTW, if you want to check for the latest version yourself, you can do so by querying &lt;a href="http://devcentral.f5.com/labs/iRuleEditor/iRulerCurrentVersion.txt"&gt;http://devcentral.f5.com/labs/iRuleEditor/iRulerCurrentVersion.txt&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ENH: New GTM syntax tokens in the editing window.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks to &lt;a href="http://devcentral.f5.com/weblogs/jason/default.aspx"&gt;Jason&lt;/a&gt;, we’ve got an updated list of GTM iRule tokens in the lexer configuration for the Editor.&lt;/p&gt;
&lt;p&gt;There’s also a few hidden Easter eggs in there that I didn’t want to enable for the general population.  Let me know if you find out how to enable them. B-).&lt;/p&gt;
&lt;p&gt;So, enough said…  Head over to the &lt;a href="http://devcentral.f5.com/Default.aspx?tabid=66"&gt;iRule Editor Labs page&lt;/a&gt; and download the latest version and let me know what you think.&lt;/p&gt;
&lt;p&gt;Oh, and don’t forget, the source is available as well if you want to dig in and add some features yourself.  I’m always happy to receive changes and incorporate them into the main distribution.&lt;/p&gt;
&lt;p&gt;-Joe&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:03199aa4-0d4f-413a-bdf1-a26cec9cce7d" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;Technorati Tags: &lt;a rel="tag" href="http://technorati.com/tags/F5"&gt;F5&lt;/a&gt;,&lt;a rel="tag" href="http://technorati.com/tags/DevCentral"&gt;DevCentral&lt;/a&gt;,&lt;a rel="tag" href="http://technorati.com/tags/iRule+Editor"&gt;iRule Editor&lt;/a&gt;,&lt;a rel="tag" href="http://technorati.com/tags/iControl"&gt;iControl&lt;/a&gt;,&lt;a rel="tag" href="http://technorati.com/tags/Joe+Pruitt"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/6022.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/05/theres-a-new-irule-editor-in-town.aspx</guid>
            <pubDate>Wed, 05 Aug 2009 21:45:59 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/6022.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/08/05/theres-a-new-irule-editor-in-town.aspx#feedback</comments>
            <slash:comments>9</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/6022.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/6022.aspx</trackback:ping>
        </item>
        <item>
            <title>Shrink-Url &amp;ndash; Use PowerShell To Shrink Your Urls</title>
            <category>F5</category>
            <category>DevCentral</category>
            <category>Development and General</category>
            <category>Microsoft Solutions</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/19/shrink-url-ndash-use-powershell-to-shrink-your-urls.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/ShrinkUrlUsePowerShellToShrinkYourUrls_9B84/poshShrink_2.jpg"&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 10px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="poshShrink" border="0" alt="poshShrink" align="right" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/ShrinkUrlUsePowerShellToShrinkYourUrls_9B84/poshShrink_thumb.jpg" width="240" height="240" /&gt;&lt;/a&gt;Shrinking your Url’s is all the rage nowadays.  If you are on Twitter, then odds are you have used one.  Despite CodingHorror’s distaste for them in his recent blog post on &lt;a href="http://www.codinghorror.com/blog/archives/001276.html"&gt;Url Shorteners: Destroying the Web since 2002&lt;/a&gt;, they are a fact of life when we live in a world of 140 character status updates.&lt;/p&gt;  &lt;p&gt;So what’s a URL shrinking service anyway?  Well, to put it simply, you supply them with a URL, they then supply you with a shorter URL containing a lookup “key”.  When future requests are made to this shorter URL, connections are routed to that services website where they convert the short URL to the original URL and issue a HTTP Redirect back to your browser to send you off to the original long url website.&lt;/p&gt;  &lt;p&gt;So, what’s a guy, or gal, to do if they want to set their status programmatically on Twitter, Facebook, FriendFeed, or the other gazillion social networking sites out there today and need to post a very long URL?  Most of these shrinking services offer API’s to access their “shrinking” services so it’s just a matter of digging into the various APIs to get them implemented.  In my original PowerShell Twitter library &lt;a href="http://devcentral.f5.com/weblogs/Joe/archive/2008/12/30/introducing-poshtweet---the-powershell-twitter-script-library.aspx"&gt;PoshTweet&lt;/a&gt;, I included support for a couple for shrinking URL’s through a couple of shrinking services but I figured it would be good to separate that functionality out into it’s own library.  &lt;/p&gt;  &lt;p&gt;So, here’s my first stab at a generic URL shortening library for PowerShell.  I’ve included the following services:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://is.gd/"&gt;is.gd&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://tinyurl.com"&gt;tinyurl&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://snurl.com"&gt;snurl&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://digg.com"&gt;digg&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://tr.im/"&gt;tr.im&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://bit.ly"&gt;bit.ly&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Some of these services have advanced features such as statistical reporting on all your submitted links.  Those services require users to create accounts and register for API keys.  Bit.ly is one of them, so if you want to use that service, you will have to supply this script with your bit.ly username and API key with the Set-BitlyServiceInfo function.&lt;/p&gt;  &lt;p&gt;So, here’s the script, hope you all enjoy!&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; param(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;   [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$longurl = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;   [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$provider = &lt;span style="color: #006080"&gt;"tinyurl"&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; $script:DIGG_APPKEY = &lt;span style="color: #006080"&gt;"http://devcentral.f5.com/PoshShrink"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; $script:BITLY_LOGIN = &lt;span style="color: #006080"&gt;""&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; $script:BITLY_KEY = &lt;span style="color: #006080"&gt;""&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt; #----------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt; # function Set-BitlyServiceInfo&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt; #----------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt; function Set-BitlyServiceInfo()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;   param(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$login = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$key = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;   );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $login -and $key )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;     $script:BITLY_LOGIN = $login;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;     $script:BITLY_KEY = $key;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;     Write-Error &lt;span style="color: #006080"&gt;"Usage: Set-BitlyServiceInfo -login login -key key"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt;  30:&lt;/span&gt; #----------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt;  31:&lt;/span&gt; # function Shrink-Url&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt;  32:&lt;/span&gt; #----------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt;  33:&lt;/span&gt; function Shrink-Url()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt;  34:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum35"&gt;  35:&lt;/span&gt;   param(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum36"&gt;  36:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$longurl = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum37"&gt;  37:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$provider = &lt;span style="color: #006080"&gt;"tinyurl"&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum38"&gt;  38:&lt;/span&gt;   );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum39"&gt;  39:&lt;/span&gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum40"&gt;  40:&lt;/span&gt;   $shorturl = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum41"&gt;  41:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $longurl )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum42"&gt;  42:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum43"&gt;  43:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;switch&lt;/span&gt; ($provider.ToLower())&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum44"&gt;  44:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum45"&gt;  45:&lt;/span&gt;       &lt;span style="color: #006080"&gt;"is.gd"&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum46"&gt;  46:&lt;/span&gt;         $shorturl = Execute-HTTPGetCommand &lt;span style="color: #006080"&gt;"http://is.gd/api.php?longurl=$longurl"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum47"&gt;  47:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum48"&gt;  48:&lt;/span&gt;       &lt;span style="color: #006080"&gt;"tinyurl"&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum49"&gt;  49:&lt;/span&gt;         $shorturl = Execute-HTTPGetCommand &lt;span style="color: #006080"&gt;"http://tinyurl.com/api-create.php?url=$longurl"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum50"&gt;  50:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum51"&gt;  51:&lt;/span&gt;       &lt;span style="color: #006080"&gt;"snurl"&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum52"&gt;  52:&lt;/span&gt;         $shorturl = Execute-HTTPGetCommand &lt;span style="color: #006080"&gt;"http://snipr.com/site/snip?r=simple&amp;amp;link=$longurl"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum53"&gt;  53:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum54"&gt;  54:&lt;/span&gt;       &lt;span style="color: #006080"&gt;"digg"&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum55"&gt;  55:&lt;/span&gt;         [xml]$results = Execute-HTTPGetCommand `&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum56"&gt;  56:&lt;/span&gt;           &lt;span style="color: #006080"&gt;"http://services.digg.com/url/short/create?url=${longurl}&amp;amp;appkey=${script:DIGG_APPKEY}"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum57"&gt;  57:&lt;/span&gt;         $shorturl = $results.shorturls.shorturl.short_url;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum58"&gt;  58:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum59"&gt;  59:&lt;/span&gt;       &lt;span style="color: #006080"&gt;"tr.im"&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum60"&gt;  60:&lt;/span&gt;         [xml]$results = Execute-HTTPGetCommand &lt;span style="color: #006080"&gt;"http://api.tr.im/api/trim_url.xml?url=$longurl"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum61"&gt;  61:&lt;/span&gt;         $shorturl = $results.trim.url;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum62"&gt;  62:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum63"&gt;  63:&lt;/span&gt;       &lt;span style="color: #006080"&gt;"bit.ly"&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum64"&gt;  64:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( !$BITLY_LOGIN -or !$BITLY_KEY )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum65"&gt;  65:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum66"&gt;  66:&lt;/span&gt;           Write-Error &lt;span style="color: #006080"&gt;"ERROR: You must configure your bit.ly LOGIN and APIKEY!"&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum67"&gt;  67:&lt;/span&gt;           exit;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum68"&gt;  68:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum69"&gt;  69:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum70"&gt;  70:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum71"&gt;  71:&lt;/span&gt;           $results = Execute-HTTPGetCommand `&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum72"&gt;  72:&lt;/span&gt;             &lt;span style="color: #006080"&gt;"http://api.bit.ly/shorten?version=2.0.1&amp;amp;longUrl=$longurl&amp;amp;login=$script:BITLY_LOGIN&amp;amp;apiKey=$script:BITLY_KEY"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum73"&gt;  73:&lt;/span&gt;           $shorturl = $results.Split(&lt;span style="color: #006080"&gt;"`n"&lt;/span&gt;)[7].Split(&lt;span style="color: #006080"&gt;""&lt;/span&gt;&lt;span style="color: #006080"&gt;""&lt;/span&gt;)[3];&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum74"&gt;  74:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum75"&gt;  75:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum76"&gt;  76:&lt;/span&gt;       &lt;span style="color: #0000ff"&gt;default&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum77"&gt;  77:&lt;/span&gt;         $shorturl = Execute-HTTPGetCommand &lt;span style="color: #006080"&gt;"http://tinyurl.com/api-create.php?url=$longurl"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum78"&gt;  78:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum79"&gt;  79:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum80"&gt;  80:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum81"&gt;  81:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum82"&gt;  82:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum83"&gt;  83:&lt;/span&gt;     Write-Host &lt;span style="color: #006080"&gt;"ERROR: Usage: Shrink-Url -longurl http://www.foo.com"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum84"&gt;  84:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum85"&gt;  85:&lt;/span&gt;   $shorturl;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum86"&gt;  86:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum87"&gt;  87:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum88"&gt;  88:&lt;/span&gt; #----------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum89"&gt;  89:&lt;/span&gt; # function Execute-HTTPGetCommand&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum90"&gt;  90:&lt;/span&gt; #----------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum91"&gt;  91:&lt;/span&gt; function Execute-HTTPGetCommand()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum92"&gt;  92:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum93"&gt;  93:&lt;/span&gt;   param([&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;] $url = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum94"&gt;  94:&lt;/span&gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum95"&gt;  95:&lt;/span&gt;   $user_agent = &lt;span style="color: #006080"&gt;"PoshShrink"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum96"&gt;  96:&lt;/span&gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum97"&gt;  97:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $url )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum98"&gt;  98:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum99"&gt;  99:&lt;/span&gt;     $request = [System.Net.HttpWebRequest]::Create($url);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum100"&gt; 100:&lt;/span&gt;     $request.UserAgent = $user_agent;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum101"&gt; 101:&lt;/span&gt;     $request.Credentials = [System.Net.CredentialCache]::DefaultCredentials;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum102"&gt; 102:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $request.Proxy )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum103"&gt; 103:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum104"&gt; 104:&lt;/span&gt;       $request.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum105"&gt; 105:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum106"&gt; 106:&lt;/span&gt;     $response = $request.GetResponse();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum107"&gt; 107:&lt;/span&gt;     $rs = $response.GetResponseStream();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum108"&gt; 108:&lt;/span&gt;     [System.IO.StreamReader]$sr = New-Object System.IO.StreamReader -argumentList $rs;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum109"&gt; 109:&lt;/span&gt;     $sr.ReadToEnd();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum110"&gt; 110:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum111"&gt; 111:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum112"&gt; 112:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum113"&gt; 113:&lt;/span&gt; Shrink-Url -longurl $longurl -provider $provider;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;You can download the full contents for this script here: &lt;a href="http://devcentral.f5.com/downloads/joe/PowerShell/Shrink-Url.ps1.txt"&gt;Shrink-Url.ps1&lt;/a&gt;&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:b5a68bcc-6924-47ee-bbab-ca3a3036f8ff" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;, &lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;, &lt;a href="http://technorati.com/tags/PowerShell" rel="tag"&gt;PowerShell&lt;/a&gt;, &lt;a href="http://technorati.com/tags/URL" rel="tag"&gt;URL&lt;/a&gt;, &lt;a href="http://technorati.com/tags/is.gd" rel="tag"&gt;is.gd&lt;/a&gt;, &lt;a href="http://technorati.com/tags/tinyurl" rel="tag"&gt;tinyurl&lt;/a&gt;, &lt;a href="http://technorati.com/tags/snurl" rel="tag"&gt;snurl&lt;/a&gt;, &lt;a href="http://technorati.com/tags/digg" rel="tag"&gt;digg&lt;/a&gt;, &lt;a href="http://technorati.com/tags/tr.im" rel="tag"&gt;tr.im&lt;/a&gt;, &lt;a href="http://technorati.com/tags/bit.ly" rel="tag"&gt;bit.ly&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/4246.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/19/shrink-url-ndash-use-powershell-to-shrink-your-urls.aspx</guid>
            <pubDate>Fri, 19 Jun 2009 18:04:07 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/4246.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/19/shrink-url-ndash-use-powershell-to-shrink-your-urls.aspx#feedback</comments>
            <slash:comments>8</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/4246.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/4246.aspx</trackback:ping>
        </item>
        <item>
            <title>Introducing PoshTwitPic &amp;ndash; Use PowerShell To Post Your Images To Twitter Via TwitPic</title>
            <category>DevCentral</category>
            <category>Development and General</category>
            <category>F5</category>
            <category>Microsoft Solutions</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/17/introducing-poshtwitpic-ndash-use-powershell-to-post-your-images-to.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/IntroducingPoshTwitPicUsePowerShellToPos_F63C/PowerShell-twitpic_2.jpg"&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 10px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PowerShell-twitpic" border="0" alt="PowerShell-twitpic" align="right" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/IntroducingPoshTwitPicUsePowerShellToPos_F63C/PowerShell-twitpic_thumb.jpg" width="229" height="121" /&gt;&lt;/a&gt;Twitter, for those who don’t know about it, is a status updating service that is all the rage nowadays.  It’s popularity is primarily due to it’s simplistic nature.  You post a 140 character status (known as a “tweet”) about what you are doing.  You can also friend other folks to see what they are doing.  If you are still lost, read up on the entry in &lt;a href="http://en.wikipedia.org/wiki/Twitter" target="_blank"&gt;Wikipedia&lt;/a&gt; and you should get the gist of it.  &lt;/p&gt;  &lt;p&gt;The downside to this minimalistic approach is that it does not allow for rich multimedia content such as images or videos to be associated with your “tweets”.  Let’s face it, posting a tweet about an awesome dinner you just had isn’t as good as posting a picture you took of it.  To account for this, various services have arisen to offload the image or video storage for twitter and many of the Twitter clients out there have incorporated these services into their apps.  &lt;a href="http://twitpic.com" target="_blank"&gt;TwitPic&lt;/a&gt; was an early entry into this category of services.  They allow you to post an image to their site while posting a “tweet” to Twitter including a link to the image.  Fortunately for us, TwitPic exposes their &lt;a href="http://twitpic.com/api.do" target="_blank"&gt;API&lt;/a&gt; to allow applications to integrate their features.&lt;/p&gt;  &lt;p&gt;Since I’ve already tackled the PowerShell Twitter functionality with my &lt;a href="http://devcentral.f5.com/weblogs/Joe/archive/2008/12/30/introducing-poshtweet---the-powershell-twitter-script-library.aspx" target="_blank"&gt;PoshTweet&lt;/a&gt; library, I figured the next logical step would be to write a TwitPic library to enable posting images to TwitPic through their API.&lt;/p&gt;  &lt;p&gt;The biggest challenge in writing this library was getting the multipart/form-data POST format working correctly.  Luckily I stumbled across a post by Martin Normark on his blog containing &lt;a href="http://www.dnknormark.net/post/C-TwitPic-API-client.aspx" target="_blank"&gt;a C# TwitPic API client&lt;/a&gt;.  It was fairly straightforward coming up with a PowerShell conversion of his C# code.&lt;/p&gt;  &lt;p&gt;My library includes the following functions&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Get-EncodedDataFromFile – Encode a local image file into a string. &lt;/li&gt;    &lt;li&gt;Get-ImageContentType – Get the Content Type for a given image file (ie. image/jpeg). &lt;/li&gt;    &lt;li&gt;Execute-HTTPPostCommand – Send a HTTP POST command containing the multipart/form-data request. &lt;/li&gt;    &lt;li&gt;Post-TwitPic – The main function that takes an image, posts it to TwitPic and optionally posts a Tweet to Twitter. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Without further ado, here’s the code:&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; param(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;   [System.IO.FileInfo]$file = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;   [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$twitteruser = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;   [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$twitterpass = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;   [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$message = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; $CODEPAGE = &lt;span style="color: #006080"&gt;"iso-8859-1"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt; $TWITPIC_API_UPLOAD = &lt;span style="color: #006080"&gt;"http://twitpic.com/api/upload"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt; $TWITPIC_API_UPLOADANDPOST = &lt;span style="color: #006080"&gt;"http://twitpic.com/api/uploadAndPost"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt; #--------------------------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt; # function Get-EncodedDataFromFile&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt; #--------------------------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt; function Get-EncodedDataFromFile()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;   param(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;     [System.IO.FileInfo]$file = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$codePageName = $CODEPAGE&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;   );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;   $data = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $file -and [System.IO.File]::Exists($file.FullName) )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;     $bytes = [System.IO.File]::ReadAllBytes($file.FullName);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $bytes )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt;  30:&lt;/span&gt;       $enc = [System.Text.Encoding]::GetEncoding($codePageName);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt;  31:&lt;/span&gt;       $data = $enc.GetString($bytes);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt;  32:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt;  33:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt;  34:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum35"&gt;  35:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum36"&gt;  36:&lt;/span&gt;     Write-Host &lt;span style="color: #006080"&gt;"ERROR; File '$file' does not exist"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum37"&gt;  37:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum38"&gt;  38:&lt;/span&gt;   $data;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum39"&gt;  39:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum40"&gt;  40:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum41"&gt;  41:&lt;/span&gt; #--------------------------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum42"&gt;  42:&lt;/span&gt; # function Get-ImageContentType&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum43"&gt;  43:&lt;/span&gt; #--------------------------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum44"&gt;  44:&lt;/span&gt; function Get-ImageContentType()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum45"&gt;  45:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum46"&gt;  46:&lt;/span&gt;   param([System.IO.FileInfo]$file = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum47"&gt;  47:&lt;/span&gt;   $contentType = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum48"&gt;  48:&lt;/span&gt;   $contentTypeMap = @{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum49"&gt;  49:&lt;/span&gt;     &lt;span style="color: #006080"&gt;".jpg"&lt;/span&gt;  = &lt;span style="color: #006080"&gt;"image/jpeg"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum50"&gt;  50:&lt;/span&gt;     &lt;span style="color: #006080"&gt;".jpeg"&lt;/span&gt; = &lt;span style="color: #006080"&gt;"image/jpeg"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum51"&gt;  51:&lt;/span&gt;     &lt;span style="color: #006080"&gt;".gif"&lt;/span&gt;  = &lt;span style="color: #006080"&gt;"image/gif"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum52"&gt;  52:&lt;/span&gt;     &lt;span style="color: #006080"&gt;".png"&lt;/span&gt;  = &lt;span style="color: #006080"&gt;"image/png"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum53"&gt;  53:&lt;/span&gt;     &lt;span style="color: #006080"&gt;".tiff"&lt;/span&gt; = &lt;span style="color: #006080"&gt;"image/tiff"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum54"&gt;  54:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum55"&gt;  55:&lt;/span&gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum56"&gt;  56:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $file )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum57"&gt;  57:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum58"&gt;  58:&lt;/span&gt;     $contentType = $contentTypeMap[$file.Extension.ToLower()];&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum59"&gt;  59:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum60"&gt;  60:&lt;/span&gt;   $contentType;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum61"&gt;  61:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum62"&gt;  62:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum63"&gt;  63:&lt;/span&gt; #----------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum64"&gt;  64:&lt;/span&gt; # function Execute-HTTPPostCommand&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum65"&gt;  65:&lt;/span&gt; #----------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum66"&gt;  66:&lt;/span&gt; function Execute-HTTPPostCommand()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum67"&gt;  67:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum68"&gt;  68:&lt;/span&gt;   param(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum69"&gt;  69:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;] $url = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum70"&gt;  70:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;] $data = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum71"&gt;  71:&lt;/span&gt;     [System.Net.NetworkCredential]$credentials = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum72"&gt;  72:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;] $contentType = &lt;span style="color: #006080"&gt;"application/x-www-form-urlencoded"&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum73"&gt;  73:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;] $codePageName = &lt;span style="color: #006080"&gt;"UTF-8"&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum74"&gt;  74:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;] $userAgent = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum75"&gt;  75:&lt;/span&gt;   );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum76"&gt;  76:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum77"&gt;  77:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $url -and $data )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum78"&gt;  78:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum79"&gt;  79:&lt;/span&gt;     [System.Net.WebRequest]$webRequest = [System.Net.WebRequest]::Create($url);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum80"&gt;  80:&lt;/span&gt;     $webRequest.ServicePoint.Expect100Continue = $&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum81"&gt;  81:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $credentials )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum82"&gt;  82:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum83"&gt;  83:&lt;/span&gt;       $webRequest.Credentials = $credentials;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum84"&gt;  84:&lt;/span&gt;       $webRequest.PreAuthenticate = $&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum85"&gt;  85:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum86"&gt;  86:&lt;/span&gt;     $webRequest.ContentType = $contentType;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum87"&gt;  87:&lt;/span&gt;     $webRequest.Method = &lt;span style="color: #006080"&gt;"POST"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum88"&gt;  88:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $userAgent )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum89"&gt;  89:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum90"&gt;  90:&lt;/span&gt;       $webRequest.UserAgent = $userAgent;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum91"&gt;  91:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum92"&gt;  92:&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum93"&gt;  93:&lt;/span&gt;     $enc = [System.Text.Encoding]::GetEncoding($codePageName);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum94"&gt;  94:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[]]$bytes = $enc.GetBytes($data);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum95"&gt;  95:&lt;/span&gt;     $webRequest.ContentLength = $bytes.Length;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum96"&gt;  96:&lt;/span&gt;     [System.IO.Stream]$reqStream = $webRequest.GetRequestStream();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum97"&gt;  97:&lt;/span&gt;     $reqStream.Write($bytes, 0, $bytes.Length);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum98"&gt;  98:&lt;/span&gt;     $reqStream.Flush();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum99"&gt;  99:&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum100"&gt; 100:&lt;/span&gt;     $resp = $webRequest.GetResponse();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum101"&gt; 101:&lt;/span&gt;     $rs = $resp.GetResponseStream();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum102"&gt; 102:&lt;/span&gt;     [System.IO.StreamReader]$sr = New-Object System.IO.StreamReader -argumentList $rs;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum103"&gt; 103:&lt;/span&gt;     $sr.ReadToEnd();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum104"&gt; 104:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum105"&gt; 105:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum106"&gt; 106:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum107"&gt; 107:&lt;/span&gt; #--------------------------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum108"&gt; 108:&lt;/span&gt; # function Post-TwitPic&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum109"&gt; 109:&lt;/span&gt; #--------------------------------------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum110"&gt; 110:&lt;/span&gt; function Post-TwitPic()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum111"&gt; 111:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum112"&gt; 112:&lt;/span&gt;   param&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum113"&gt; 113:&lt;/span&gt;   (&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum114"&gt; 114:&lt;/span&gt;     [System.IO.FileInfo]$file = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum115"&gt; 115:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$twitteruser = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum116"&gt; 116:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$twitterpass = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum117"&gt; 117:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$message = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum118"&gt; 118:&lt;/span&gt;   );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum119"&gt; 119:&lt;/span&gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum120"&gt; 120:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $file -and $twitteruser -and $twitterpass )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum121"&gt; 121:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum122"&gt; 122:&lt;/span&gt;     $boundary = [System.Guid]::NewGuid().ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum123"&gt; 123:&lt;/span&gt;     $header = &lt;span style="color: #006080"&gt;"--{0}"&lt;/span&gt; -f $boundary;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum124"&gt; 124:&lt;/span&gt;     $footer = &lt;span style="color: #006080"&gt;"--{0}--"&lt;/span&gt; -f $boundary;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum125"&gt; 125:&lt;/span&gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum126"&gt; 126:&lt;/span&gt;     [System.Text.StringBuilder]$contents = New-Object System.Text.StringBuilder;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum127"&gt; 127:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine($header);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum128"&gt; 128:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum129"&gt; 129:&lt;/span&gt;     $filedata = Get-EncodedDataFromFile -file $file -codePageName $CODEPAGE;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum130"&gt; 130:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $filedata )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum131"&gt; 131:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum132"&gt; 132:&lt;/span&gt;       $fileContentType = Get-ImageContentType -file $file;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum133"&gt; 133:&lt;/span&gt;       $fileHeader = &lt;span style="color: #006080"&gt;"Content-Disposition: file; name="&lt;/span&gt;&lt;span style="color: #006080"&gt;"{0}"&lt;/span&gt;&lt;span style="color: #006080"&gt;"; filename="&lt;/span&gt;&lt;span style="color: #006080"&gt;"{1}"&lt;/span&gt;&lt;span style="color: #006080"&gt;""&lt;/span&gt; -f &lt;span style="color: #006080"&gt;"media"&lt;/span&gt;, $file.Name;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum134"&gt; 134:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum135"&gt; 135:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine($fileHeader);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum136"&gt; 136:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine(&lt;span style="color: #006080"&gt;"Content-Type: {0}"&lt;/span&gt; -f $fileContentType);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum137"&gt; 137:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum138"&gt; 138:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine($fileData);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum139"&gt; 139:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum140"&gt; 140:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine($header);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum141"&gt; 141:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine(&lt;span style="color: #006080"&gt;"Content-Disposition: form-data; name="&lt;/span&gt;&lt;span style="color: #006080"&gt;"username"&lt;/span&gt;&lt;span style="color: #006080"&gt;""&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum142"&gt; 142:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum143"&gt; 143:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine($twitteruser);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum144"&gt; 144:&lt;/span&gt;       &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum145"&gt; 145:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine($header);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum146"&gt; 146:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine(&lt;span style="color: #006080"&gt;"Content-Disposition: form-data; name="&lt;/span&gt;&lt;span style="color: #006080"&gt;"password"&lt;/span&gt;&lt;span style="color: #006080"&gt;""&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum147"&gt; 147:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum148"&gt; 148:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine($twitterpass);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum149"&gt; 149:&lt;/span&gt;       &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum150"&gt; 150:&lt;/span&gt;       $url = $TWITPIC_API_UPLOAD;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum151"&gt; 151:&lt;/span&gt;       &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $message )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum152"&gt; 152:&lt;/span&gt;       {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum153"&gt; 153:&lt;/span&gt;         [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine($header);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum154"&gt; 154:&lt;/span&gt;         [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine(&lt;span style="color: #006080"&gt;"Content-Disposition: form-data; name="&lt;/span&gt;&lt;span style="color: #006080"&gt;"message"&lt;/span&gt;&lt;span style="color: #006080"&gt;""&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum155"&gt; 155:&lt;/span&gt;         [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum156"&gt; 156:&lt;/span&gt;         [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine($message);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum157"&gt; 157:&lt;/span&gt;         &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum158"&gt; 158:&lt;/span&gt;         $url = $TWITPIC_API_UPLOADANDPOST;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum159"&gt; 159:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum160"&gt; 160:&lt;/span&gt;       &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum161"&gt; 161:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;]$contents.AppendLine($footer);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum162"&gt; 162:&lt;/span&gt;       &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum163"&gt; 163:&lt;/span&gt;       $contents.ToString() &amp;gt; &lt;span style="color: #006080"&gt;".\out.txt"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum164"&gt; 164:&lt;/span&gt;       &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum165"&gt; 165:&lt;/span&gt;       $postContentType = &lt;span style="color: #006080"&gt;"multipart/form-data; boundary={0}"&lt;/span&gt; -f $boundary;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum166"&gt; 166:&lt;/span&gt;       &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum167"&gt; 167:&lt;/span&gt;       [xml]$resp = Execute-HTTPPostcommand -url $url -data $contents.ToString() `&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum168"&gt; 168:&lt;/span&gt;         -contentType $postContentType -codePageName $CODEPAGE -userAgent &lt;span style="color: #006080"&gt;"PoshTwitPic"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum169"&gt; 169:&lt;/span&gt;       &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum170"&gt; 170:&lt;/span&gt;       &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $resp )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum171"&gt; 171:&lt;/span&gt;       {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum172"&gt; 172:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;switch&lt;/span&gt; ($resp.rsp.stat)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum173"&gt; 173:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum174"&gt; 174:&lt;/span&gt;           &lt;span style="color: #006080"&gt;"ok"&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum175"&gt; 175:&lt;/span&gt;             $obj = 1 | select mediaid, mediaurl;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum176"&gt; 176:&lt;/span&gt;             $obj.mediaid = $resp.rsp.mediaid;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum177"&gt; 177:&lt;/span&gt;             $obj.mediaurl = $resp.rsp.mediaurl;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum178"&gt; 178:&lt;/span&gt;             $obj;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum179"&gt; 179:&lt;/span&gt;           }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum180"&gt; 180:&lt;/span&gt;           &lt;span style="color: #006080"&gt;"fail"&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum181"&gt; 181:&lt;/span&gt;             $errcode = $resp.rsp.err.code;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum182"&gt; 182:&lt;/span&gt;             $errmsg = $resp.rsp.err.msg;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum183"&gt; 183:&lt;/span&gt;             Write-Host &lt;span style="color: #006080"&gt;"Post Error: Code = '$errcode'; Message = '$errmsg'"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum184"&gt; 184:&lt;/span&gt;           }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum185"&gt; 185:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum186"&gt; 186:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum187"&gt; 187:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum188"&gt; 188:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum189"&gt; 189:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum190"&gt; 190:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum191"&gt; 191:&lt;/span&gt;     Write-Host &lt;span style="color: #006080"&gt;"USAGE: Post-TwitPic.ps1 -file file -twitteruser user -twitterpass pass"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum192"&gt; 192:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum193"&gt; 193:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum194"&gt; 194:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum195"&gt; 195:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $file -and $twitteruser -and $twitterpass )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum196"&gt; 196:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum197"&gt; 197:&lt;/span&gt;   Post-TwitPic -file $file -twitteruser $twitteruser -twitterpass $twitterpass -message $message;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum198"&gt; 198:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum199"&gt; 199:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum200"&gt; 200:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum201"&gt; 201:&lt;/span&gt;   Write-Host &lt;span style="color: #006080"&gt;"USAGE: Post-TwitPic.ps1 -file file -twitteruser user -twitterpass pass"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; 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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum202"&gt; 202:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The entire script can be downloaded from here: &lt;a href="http://devcentral.f5.com/downloads/joe/powershell/Post-TwitPic.ps1.txt" target="_blank"&gt;Post-TwitPic.ps1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy Tweeting!&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:9bab6a7a-2750-428b-9ed9-7db476a2dc0c" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;, &lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;, &lt;a href="http://technorati.com/tags/PowerShell" rel="tag"&gt;PowerShell&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Twitter" rel="tag"&gt;Twitter&lt;/a&gt;, &lt;a href="http://technorati.com/tags/TwitPic" rel="tag"&gt;TwitPic&lt;/a&gt;, &lt;a href="http://technorati.com/tags/POST" rel="tag"&gt;POST&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/4240.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/17/introducing-poshtwitpic-ndash-use-powershell-to-post-your-images-to.aspx</guid>
            <pubDate>Thu, 18 Jun 2009 00:31:15 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/4240.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/17/introducing-poshtwitpic-ndash-use-powershell-to-post-your-images-to.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/4240.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/4240.aspx</trackback:ping>
        </item>
        <item>
            <title>Introducing AskBing &amp;ndash; The PowerShell Bing Twitter Proxy</title>
            <category>F5</category>
            <category>DevCentral</category>
            <category>Development and General</category>
            <category>Microsoft Solutions</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/08/introducing-askbing-ndash-the-powershell-bing-twitter-proxy.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/IntroducingAskBingThePowerShellBingTwitt_A31B/TwitterBing_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px 10px; display: inline; border-top: 0px; border-right: 0px" title="TwitterBing" border="0" alt="TwitterBing" align="right" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/IntroducingAskBingThePowerShellBingTwitt_A31B/TwitterBing_thumb.jpg" width="240" height="158" /&gt;&lt;/a&gt;Last week I posted a PowerShell function library for Microsoft’s newly introduced search engine at Bing.com.  The function library was appropriately named &lt;a href="http://tinyurl.com/poshbing"&gt;PoshBing&lt;/a&gt;. There was a log of interest in the script so I quickly moved it off my blog and onto &lt;a href="http://poshbing.codeplex.com"&gt;a CodePlex project under PoshBing&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Working on the command line is fun and all, but since I spend a good portion of my time accessing my twitter account, I figured it would be a bit of fun to integrate it with my previously released &lt;a href="http://tinyurl.com/poshtweet"&gt;PoshTweet&lt;/a&gt; PowerShell twitter library.&lt;/p&gt;  &lt;p&gt;So, after an hour or so of coding it up and creating the &lt;a href="http://twitter.com/askbing"&gt;@askbing twitter account&lt;/a&gt;, I’ve got it up and running.  &lt;/p&gt;  &lt;p&gt;Using it is as simple as posting a message mentioning the @askbing account.  The Usage is as follows:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;@askbing [sourcetype [options]] question_or_search_terms&lt;/p&gt;    &lt;p&gt;If you omit the sourcetype it will default to “web”.  The following sourcetypes and options are currently available:&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;@askbing &lt;strong&gt;image&lt;/strong&gt; iPod&lt;/li&gt;      &lt;li&gt;@askbing &lt;strong&gt;instantanswer &lt;/strong&gt;feet in a mile&lt;/li&gt;      &lt;li&gt;@askbing &lt;strong&gt;news&lt;/strong&gt; FFIV&lt;/li&gt;      &lt;li&gt;@askbing &lt;strong&gt;mobileweb &lt;/strong&gt;games&lt;/li&gt;      &lt;li&gt;@askbing &lt;strong&gt;phonebook&lt;/strong&gt; “F5 Networks”&lt;/li&gt;      &lt;li&gt;@askbing &lt;strong&gt;relatedsearch &lt;/strong&gt;“Xbox”&lt;/li&gt;      &lt;li&gt;@askbing &lt;strong&gt;spell&lt;/strong&gt; Is this missspelled?"&lt;/li&gt;      &lt;li&gt;@askbing &lt;strong&gt;web&lt;/strong&gt; Apple&lt;/li&gt;      &lt;li&gt;@askbing &lt;strong&gt;translation en:es&lt;/strong&gt; Hi, how are you?&lt;/li&gt;      &lt;li&gt;@askbing &lt;strong&gt;video &lt;/strong&gt;The Pick of Destiny&lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p&gt;The only source type that includes a separate option is “translation”  By default it will translate from English to Spanish.  If you want to override these languages, you can use the “&lt;em&gt;from:to&lt;/em&gt;” option to override these defaults.  The values for the &lt;em&gt;from &lt;/em&gt;and &lt;em&gt;to&lt;/em&gt; languages &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Ar = Arabic&lt;/li&gt;    &lt;li&gt;zh-CHS = Simplified Chinese&lt;/li&gt;    &lt;li&gt;zh-CHT = Traditional Chinese&lt;/li&gt;    &lt;li&gt;Nl = Dutch&lt;/li&gt;    &lt;li&gt;En = English&lt;/li&gt;    &lt;li&gt;Fr = French&lt;/li&gt;    &lt;li&gt;De = German&lt;/li&gt;    &lt;li&gt;It = Italian&lt;/li&gt;    &lt;li&gt;Ja = Japanese&lt;/li&gt;    &lt;li&gt;Ko = Korean&lt;/li&gt;    &lt;li&gt;Pl = Polish&lt;/li&gt;    &lt;li&gt;Pt = Portuguese&lt;/li&gt;    &lt;li&gt;Ru = Russian&lt;/li&gt;    &lt;li&gt;Es = Spanish&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;After you post an @reply to @askbing, you should expect a @reply to your account within a minute or so.&lt;/p&gt;  &lt;p&gt;Since I’ve only spent an hour or so on this, there are bound to be some issues so please let me know if you find any.  Here' are a few known issues:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;It queries it’s @replies every 60 seconds and only queries 100 entries so if this ever gets more popular that that, I’ll need to enhance the request logic.&lt;/li&gt;    &lt;li&gt;It only returns the first entry returned from the bing services.  I might change this to a random entry later on.&lt;/li&gt;    &lt;li&gt;It has little error handling so if you get a garbled response, then that’s likely the reason.&lt;/li&gt;    &lt;li&gt;It uses tinyurl for Url shortening which is sometimes fairly flaky.&lt;/li&gt;    &lt;li&gt;Probably more…&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So, when you’ve got some time, Send a @reply to @askbing and see how it works for you.  I’d love to hear any and all feedback.&lt;/p&gt;  &lt;p&gt;-Joe&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:ce5a4e40-cd12-4b36-888c-4e3b23737718" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;, &lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;, &lt;a href="http://technorati.com/tags/PowerShell" rel="tag"&gt;PowerShell&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Bing" rel="tag"&gt;Bing&lt;/a&gt;, &lt;a href="http://technorati.com/tags/PoshBing" rel="tag"&gt;PoshBing&lt;/a&gt;, &lt;a href="http://technorati.com/tags/PoshTweet" rel="tag"&gt;PoshTweet&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/4221.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/08/introducing-askbing-ndash-the-powershell-bing-twitter-proxy.aspx</guid>
            <pubDate>Mon, 08 Jun 2009 18:36:53 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/4221.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/08/introducing-askbing-ndash-the-powershell-bing-twitter-proxy.aspx#feedback</comments>
            <slash:comments>10</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/4221.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/4221.aspx</trackback:ping>
        </item>
        <item>
            <title>Introducing PoshBing &amp;ndash; The PowerShell library for Microsoft&amp;rsquo;s Bing Search Engine</title>
            <category>DevCentral</category>
            <category>Development and General</category>
            <category>F5</category>
            <category>Microsoft Solutions</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/03/introducing-poshbing-ndash-the-powershell-library-for-microsoftrsquos-bing-search.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/IntroducingPoshBingThePowerShelllibraryf_B74B/PoshBing_2.jpg"&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 10px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PoshBing" border="0" alt="PoshBing" align="right" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/IntroducingPoshBingThePowerShelllibraryf_B74B/PoshBing_thumb.jpg" width="240" height="93" /&gt;&lt;/a&gt; Microsoft released their new search engine called “Bing” at, aptly named, &lt;a href="http://www.bing.com"&gt;http://www.bing.com&lt;/a&gt;.  Microsoft is getting positive reviews from the likes of &lt;a href="http://news.cnet.com/8301-17939_109-10251432-2.html"&gt;CNET&lt;/a&gt;, &lt;a href="http://online.wsj.com/article/SB124398438264979107.html"&gt;The Wall Street Journal&lt;/a&gt;, and &lt;a href="http://www.techcrunch.com/2009/06/01/apparently-bing-is-something-of-a-hit/"&gt;TechCrunch&lt;/a&gt;.  Instead of posting my review of the site, I’ll let you browse the above links to find out what the services is all about.&lt;/p&gt;  &lt;p&gt;What interested me about Bing is that Microsoft has released a full API to allow you to use their services in your applications.  The &lt;a href="http://msdn.microsoft.com/en-us/library/dd251056.aspx"&gt;Bing API&lt;/a&gt; is documented at Microsoft’s developer site and I thought to myself how I could test it out.  The obvious answer was PowerShell of course.  My previous PoshTweet Twitter Library has been fairly popular so I figured I’d give a “library” type project another go around and tackle the Bing APIs.&lt;/p&gt;  &lt;p&gt;The Bing API has the concept of “&lt;a href="http://msdn.microsoft.com/en-us/library/dd250847.aspx"&gt;SourceTypes&lt;/a&gt;” which are essentially data sources that you can search into.  My script library provides access to the &lt;a href="http://msdn.microsoft.com/en-us/library/dd250942.aspx"&gt;Image&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd251029.aspx"&gt;InstantAnswer&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd250884.aspx"&gt;News&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd560912.aspx"&gt;MobileWeb&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd251005.aspx"&gt;Phonebook&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd250898.aspx"&gt;RelatedSearch&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd251071.aspx"&gt;Spell&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd250845.aspx"&gt;Web&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd877872.aspx"&gt;Translation&lt;/a&gt;, and &lt;a href="http://msdn.microsoft.com/en-us/library/dd560940.aspx"&gt;Video&lt;/a&gt; SourceTypes with the following functions:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Get-BingImage&lt;/strong&gt; – Search the Image SourceType for a list of images including properties about the media files. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Get-BingInstantAnswer&lt;/strong&gt; – Get single, authoritative answers to questions. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Get-BingNews&lt;/strong&gt; – Provide news specific to a topic, a location, or breaking news. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Get-BingMobileWeb &lt;/strong&gt;– Returns mobile web results, primarily relevant XHTML or WML pages. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Get-BingPhonebook &lt;/strong&gt;– Enables you to view details about a business for which you are searching as if they were a phonebook entry. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Get-BingRelatedSearch &lt;/strong&gt;– View searches that provide information in which you might be interested, based on your current search. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Get-BingSpell &lt;/strong&gt;– Query alternative spellings for a given word or phrase. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Get-BingWeb &lt;/strong&gt;– Get pages relevant to the queried terms. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Get-BingTranslation &lt;/strong&gt;– Translate a term from one language to another. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Get-BingVideo &lt;/strong&gt;– return a list of videos and their properties relevant to the query terms. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I’ve included parsing for the response streams for the above SourceTypes, but if you would like to get the raw XML back, all of the above functions include a “-raw” parameter to allow you to bypass the response processing.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h3 align="left"&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;*Update*&lt;/font&gt;&lt;/strong&gt; &lt;/h3&gt;  &lt;p&gt;This little script has taken on a life of it’s own.  As a consequence, I’ve created a project on CodePlex.com to manage the distributions.  You can access it now at the following link:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://poshbing.codeplex.com"&gt;http://poshbing.codeplex.com&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Enjoy!&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:b9dec2b3-aa83-4b0d-8ded-9aa1753ac634" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;, &lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;, &lt;a href="http://technorati.com/tags/PowerShell" rel="tag"&gt;PowerShell&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Bing" rel="tag"&gt;Bing&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Bing.com" rel="tag"&gt;Bing.com&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Search" rel="tag"&gt;Search&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/4208.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/03/introducing-poshbing-ndash-the-powershell-library-for-microsoftrsquos-bing-search.aspx</guid>
            <pubDate>Wed, 03 Jun 2009 20:02:44 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/4208.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/06/03/introducing-poshbing-ndash-the-powershell-library-for-microsoftrsquos-bing-search.aspx#feedback</comments>
            <slash:comments>39</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/4208.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/4208.aspx</trackback:ping>
        </item>
        <item>
            <title>Unix To PowerShell - Md5</title>
            <category>DevCentral</category>
            <category>Development and General</category>
            <category>F5</category>
            <category>Microsoft Solutions</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/05/18/unix-to-powershell---md5.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/UnixToPowerShellMd5_7254/PowerShell_unix_2.jpg"&gt;&lt;img title="PowerShell_unix" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 0px 10px 10px; border-right-width: 0px" height="133" alt="PowerShell_unix" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/UnixToPowerShellMd5_7254/PowerShell_unix_thumb.jpg" width="136" align="right" border="0" /&gt;&lt;/a&gt; PowerShell is definitely gaining momentum in the windows scripting world but I still hear folks wanting to rely on Unix based tools to get their job done.  In this series of posts I’m going to look at converting some of the more popular Unix based tools to PowerShell.&lt;/p&gt;  &lt;h3&gt;md5&lt;/h3&gt;  &lt;p&gt;The Unix “md5” command (aliased to “openssl dgst –md5” or “&lt;a href="http://en.wikipedia.org/wiki/Md5sum"&gt;md5sum&lt;/a&gt;”) calculates and verifies 128-bit MD5 hashes as described in &lt;a href="http://tools.ietf.org/html/rfc1321"&gt;RFC 1321&lt;/a&gt;.  The MD5 hash (or checksum) functions as a compact digital fingerprint of a file.  It is extremely unlikely that any two non-identical files existing in the real world will have the same MD5 hash.&lt;/p&gt;  &lt;p&gt;The “openssl dgst –md5” option, there is a “-c” option to include colons between the two digit groups in the digest.  The “md5sum” command does not.  I’ve opted to use the output format of the “openssl” version of the command for my PowerShell function.&lt;/p&gt; &lt;center&gt;   &lt;table border="0"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;th&gt;Unix&lt;/th&gt;          &lt;th&gt;PowerShell&lt;/th&gt;          &lt;th&gt;Description&lt;/th&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td align="center"&gt;-c&lt;/td&gt;          &lt;td align="center"&gt;-colons&lt;/td&gt;          &lt;td align="center"&gt;Print the digest in two-digit groups            &lt;br /&gt;separated by colons.&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/center&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; #----------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; # Md5.ps1&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt; #----------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt; param&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt; (&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;   [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$filespec = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;   [&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;]$colons = $&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt; );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt; #----------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt; # function Do-Md5&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt; #----------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum13" style="color: #606060"&gt;  13:&lt;/span&gt; function Do-Md5()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum14" style="color: #606060"&gt;  14:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum15" style="color: #606060"&gt;  15:&lt;/span&gt;   param&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum16" style="color: #606060"&gt;  16:&lt;/span&gt;   (&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum17" style="color: #606060"&gt;  17:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$filespec = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum18" style="color: #606060"&gt;  18:&lt;/span&gt;     [&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;]$colons = $&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum19" style="color: #606060"&gt;  19:&lt;/span&gt;   );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum20" style="color: #606060"&gt;  20:&lt;/span&gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum21" style="color: #606060"&gt;  21:&lt;/span&gt;   $hashAlgorithm = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;-&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; -TypeName &lt;span style="color: #006080"&gt;"System.Security.Cryptography.MD5CryptoServiceProvider"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum22" style="color: #606060"&gt;  22:&lt;/span&gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum23" style="color: #606060"&gt;  23:&lt;/span&gt;   $files = @(Get-ChildItem -Path $filespec -ErrorAction SilentlyContinue);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum24" style="color: #606060"&gt;  24:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; ($file &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; $files)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum25" style="color: #606060"&gt;  25:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum26" style="color: #606060"&gt;  26:&lt;/span&gt;     $stream = $file.OpenRead();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum27" style="color: #606060"&gt;  27:&lt;/span&gt;     $hashByteArray = $hashAlgorithm.ComputeHash($stream);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum28" style="color: #606060"&gt;  28:&lt;/span&gt;     $stream.Close();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum29" style="color: #606060"&gt;  29:&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum30" style="color: #606060"&gt;  30:&lt;/span&gt;     $md5StringBuilder = New-Object System.Text.StringBuilder&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum31" style="color: #606060"&gt;  31:&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum32" style="color: #606060"&gt;  32:&lt;/span&gt;     $hashByteArray | % {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum33" style="color: #606060"&gt;  33:&lt;/span&gt;       &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $colons )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum34" style="color: #606060"&gt;  34:&lt;/span&gt;       {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum35" style="color: #606060"&gt;  35:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $md5StringBuilder.Length -gt 0 ) { [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;] $md5StringBuilder.Append(&lt;span style="color: #006080"&gt;":"&lt;/span&gt;) }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum36" style="color: #606060"&gt;  36:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum37" style="color: #606060"&gt;  37:&lt;/span&gt;       [&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;] $md5StringBuilder.Append($_.ToString(&lt;span style="color: #006080"&gt;"x2"&lt;/span&gt;))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum38" style="color: #606060"&gt;  38:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum39" style="color: #606060"&gt;  39:&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum40" style="color: #606060"&gt;  40:&lt;/span&gt;     &lt;span style="color: #006080"&gt;"MD5($($file.Name))= $($md5StringBuilder.ToString())"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum41" style="color: #606060"&gt;  41:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum42" style="color: #606060"&gt;  42:&lt;/span&gt;     # Ensure stream &lt;span style="color: #0000ff"&gt;is&lt;/span&gt; closed &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; exceptions occurred.&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum43" style="color: #606060"&gt;  43:&lt;/span&gt;     trap&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum44" style="color: #606060"&gt;  44:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum45" style="color: #606060"&gt;  45:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ($stream -ne $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) { $stream.Close(); }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum46" style="color: #606060"&gt;  46:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum47" style="color: #606060"&gt;  47:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum48" style="color: #606060"&gt;  48:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum49" style="color: #606060"&gt;  49:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum50" style="color: #606060"&gt;  50:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum51" style="color: #606060"&gt;  51:&lt;/span&gt; Do-Md5 -filespec $filespec -colons $colons;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;You can download the source for this script here: &lt;a href="http://devcentral.f5.com/downloads/joe/powershell/Md5.ps1.txt"&gt;Md5.ps1&lt;/a&gt;&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6653519e-e3bc-4b00-b5e8-1ebea17daa69" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;, &lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Unix2PowerShell" rel="tag"&gt;Unix2PowerShell&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Unix" rel="tag"&gt;Unix&lt;/a&gt;, &lt;a href="http://technorati.com/tags/PowerShell" rel="tag"&gt;PowerShell&lt;/a&gt;, &lt;a href="http://technorati.com/tags/md5" rel="tag"&gt;md5&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/6005.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/05/18/unix-to-powershell---md5.aspx</guid>
            <pubDate>Mon, 18 May 2009 15:08:32 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/6005.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/05/18/unix-to-powershell---md5.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/6005.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/6005.aspx</trackback:ping>
        </item>
        <item>
            <title>Unix To PowerShell - Touch</title>
            <category>Development and General</category>
            <category>F5</category>
            <category>DevCentral</category>
            <category>Microsoft Solutions</category>
            <link>http://devcentral.f5.com/weblogs/Joe/archive/2009/05/07/unix-to-powershell---touch.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/UnixToPowerShellTouch_8EB4/PowerShell_unix_2.jpg"&gt;&lt;img title="PowerShell_unix" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 0px 10px 10px; border-right-width: 0px" height="133" alt="PowerShell_unix" src="http://devcentral.f5.com/weblogs/images/devcentral_f5_com/weblogs/Joe/WindowsLiveWriter/UnixToPowerShellTouch_8EB4/PowerShell_unix_thumb.jpg" width="136" align="right" border="0" /&gt;&lt;/a&gt; PowerShell is definitely gaining momentum in the windows scripting world but I still hear folks wanting to rely on Unix based tools to get their job done.  In this series of posts I’m going to look at converting some of the more popular Unix based tools to PowerShell.&lt;/p&gt;  &lt;h3&gt;touch&lt;/h3&gt;  &lt;p&gt;The Unix “&lt;a href="http://en.wikipedia.org/wiki/Touch_(Unix)"&gt;touch&lt;/a&gt;” command is used to change a file’s access and modification timestamps.  It can also be used to create a new empty file.&lt;/p&gt;  &lt;p&gt;The options to the Unix touch command are implemented with the following PowerShell parameters:&lt;/p&gt; &lt;center&gt;   &lt;table&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;th&gt;Unix&lt;/th&gt;          &lt;th&gt;PowerShell&lt;/th&gt;          &lt;th&gt;Description&lt;/th&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td align="center"&gt;FILE&lt;/td&gt;          &lt;td align="center"&gt;-filespec&lt;/td&gt;          &lt;td align="center"&gt;The files to modify.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td align="center"&gt;-d&lt;/td&gt;          &lt;td align="center"&gt;-datetime&lt;/td&gt;          &lt;td align="center"&gt;Parse STRING and use it instead of current time.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td align="center"&gt;-F&lt;/td&gt;          &lt;td align="center"&gt;-forward&lt;/td&gt;          &lt;td align="center"&gt;Modify the time by going forward SECONDS seconds.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td align="center"&gt;-r&lt;/td&gt;          &lt;td align="center"&gt;-reference&lt;/td&gt;          &lt;td align="center"&gt;Use this file as a reference instead of the current time.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td align="center"&gt;-m&lt;/td&gt;          &lt;td align="center"&gt;-only_modification&lt;/td&gt;          &lt;td align="center"&gt;Change only the modification time.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td align="center"&gt;-a&lt;/td&gt;          &lt;td align="center"&gt;-only_access&lt;/td&gt;          &lt;td align="center"&gt;Change only the access time.&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/center&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; #----------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; # Touch.ps1&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt; #----------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt; param&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt; (&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;   [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$filespec = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,         # Files to touch&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;   [DateTime]$datetime = ([DateTime]::Now), # Use DateTime STRING instead of current time.&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;   [&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;]$forward = 0,                 # Modify the time by going forward SECONDS s.&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;   [&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;]$reference = $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,        # Use &lt;span style="color: #0000ff"&gt;this&lt;/span&gt; file&lt;span style="color: #006080"&gt;'s time instead of current time.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;   [bool]$only_modification = $false, # Change only the modification time.&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;   [bool]$only_access = $false        # Change only the access time&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt; );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum13" style="color: #606060"&gt;  13:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum14" style="color: #606060"&gt;  14:&lt;/span&gt; #----------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum15" style="color: #606060"&gt;  15:&lt;/span&gt; # Function Do-Touch&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum16" style="color: #606060"&gt;  16:&lt;/span&gt; #----------------------------------------------------------------&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum17" style="color: #606060"&gt;  17:&lt;/span&gt; function Do-Touch {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum18" style="color: #606060"&gt;  18:&lt;/span&gt;   param(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum19" style="color: #606060"&gt;  19:&lt;/span&gt;     [string]$filespec = $null,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum20" style="color: #606060"&gt;  20:&lt;/span&gt;     [datetime]$datetime = ([DateTime]::Now),&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum21" style="color: #606060"&gt;  21:&lt;/span&gt;     [int]$forward = 0,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum22" style="color: #606060"&gt;  22:&lt;/span&gt;     [string]$reference = $null,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum23" style="color: #606060"&gt;  23:&lt;/span&gt;     [bool]$only_modification = $false,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum24" style="color: #606060"&gt;  24:&lt;/span&gt;     [bool]$only_access = $false&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum25" style="color: #606060"&gt;  25:&lt;/span&gt;   );&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum26" style="color: #606060"&gt;  26:&lt;/span&gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum27" style="color: #606060"&gt;  27:&lt;/span&gt;   $touch = $null;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum28" style="color: #606060"&gt;  28:&lt;/span&gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum29" style="color: #606060"&gt;  29:&lt;/span&gt;   if ( $filespec )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum30" style="color: #606060"&gt;  30:&lt;/span&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum31" style="color: #606060"&gt;  31:&lt;/span&gt;     $files = @(Get-ChildItem -Path $filespec -ErrorAction SilentlyContinue)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum32" style="color: #606060"&gt;  32:&lt;/span&gt;     if ( !$files )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum33" style="color: #606060"&gt;  33:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum34" style="color: #606060"&gt;  34:&lt;/span&gt;       # If file doesn't exist, attempt to create one.&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum35" style="color: #606060"&gt;  35:&lt;/span&gt;       # A wildcard patter will fail silently.&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum36" style="color: #606060"&gt;  36:&lt;/span&gt;       Set-Content -Path $filespec -&lt;span style="color: #0000ff"&gt;value&lt;/span&gt; $&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum37" style="color: #606060"&gt;  37:&lt;/span&gt;       $files = @(Get-ChildItem -Path $filespec -ErrorAction SilentlyContinue);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum38" style="color: #606060"&gt;  38:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum39" style="color: #606060"&gt;  39:&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum40" style="color: #606060"&gt;  40:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $files )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum41" style="color: #606060"&gt;  41:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum42" style="color: #606060"&gt;  42:&lt;/span&gt;       &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $reference )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum43" style="color: #606060"&gt;  43:&lt;/span&gt;       {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum44" style="color: #606060"&gt;  44:&lt;/span&gt;         $reffile = Get-ChildItem -Path $reference -ErrorAction SilentlyContinue;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum45" style="color: #606060"&gt;  45:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $reffile )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum46" style="color: #606060"&gt;  46:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum47" style="color: #606060"&gt;  47:&lt;/span&gt;           [datetime]$touch = $reffile.LastAccessTime.AddSeconds($forward);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum48" style="color: #606060"&gt;  48:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum49" style="color: #606060"&gt;  49:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum50" style="color: #606060"&gt;  50:&lt;/span&gt;       elseif ( $datetime )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum51" style="color: #606060"&gt;  51:&lt;/span&gt;       {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum52" style="color: #606060"&gt;  52:&lt;/span&gt;         [datetime]$touch = $datetime.AddSeconds($forward);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum53" style="color: #606060"&gt;  53:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum54" style="color: #606060"&gt;  54:&lt;/span&gt;       &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum55" style="color: #606060"&gt;  55:&lt;/span&gt;       &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $touch )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum56" style="color: #606060"&gt;  56:&lt;/span&gt;       {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum57" style="color: #606060"&gt;  57:&lt;/span&gt;         [DateTime]$UTCTime = $touch.ToUniversalTime();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum58" style="color: #606060"&gt;  58:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; ($file &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; $files)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum59" style="color: #606060"&gt;  59:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum60" style="color: #606060"&gt;  60:&lt;/span&gt;           &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; ( $only_access )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum61" style="color: #606060"&gt;  61:&lt;/span&gt;           {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum62" style="color: #606060"&gt;  62:&lt;/span&gt;             $file.LastAccessTime=$touch&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum63" style="color: #606060"&gt;  63:&lt;/span&gt;             $file.LastAccessTimeUtc=$UTCTime&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum64" style="color: #606060"&gt;  64:&lt;/span&gt;           }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum65" style="color: #606060"&gt;  65:&lt;/span&gt;           elseif ( $only_modification )&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum66" style="color: #606060"&gt;  66:&lt;/span&gt;           {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum67" style="color: #606060"&gt;  67:&lt;/span&gt;             $file.LastWriteTime=$touch&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum68" style="color: #606060"&gt;  68:&lt;/span&gt;             $file.LastWriteTimeUtc=$UTCTime&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum69" style="color: #606060"&gt;  69:&lt;/span&gt;           }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum70" style="color: #606060"&gt;  70:&lt;/span&gt;           &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum71" style="color: #606060"&gt;  71:&lt;/span&gt;           {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum72" style="color: #606060"&gt;  72:&lt;/span&gt;             $file.CreationTime = $touch;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum73" style="color: #606060"&gt;  73:&lt;/span&gt;             $file.CreationTimeUtc = $UTCTime;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum74" style="color: #606060"&gt;  74:&lt;/span&gt;             $file.LastAccessTime=$touch&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum75" style="color: #606060"&gt;  75:&lt;/span&gt;             $file.LastAccessTimeUtc=$UTCTime&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum76" style="color: #606060"&gt;  76:&lt;/span&gt;             $file.LastWriteTime=$touch&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum77" style="color: #606060"&gt;  77:&lt;/span&gt;             $file.LastWriteTimeUtc=$UTCTime&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum78" style="color: #606060"&gt;  78:&lt;/span&gt;           }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum79" style="color: #606060"&gt;  79:&lt;/span&gt;           $file | select Name, *time*&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum80" style="color: #606060"&gt;  80:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum81" style="color: #606060"&gt;  81:&lt;/span&gt;       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum82" style="color: #606060"&gt;  82:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum83" style="color: #606060"&gt;  83:&lt;/span&gt;   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum84" style="color: #606060"&gt;  84:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum85" style="color: #606060"&gt;  85:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum86" style="color: #606060"&gt;  86:&lt;/span&gt; Do-Touch -filespec $filespec -datetime $datetime -forward $forward -reference $reference `&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span id="lnum87" style="color: #606060"&gt;  87:&lt;/span&gt;   -only_modification $only_modification -only_access $only_access;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;You can download the full script here: &lt;a href="http://devcentral.f5.com/downloads/joe/powershell/Touch.ps1.txt"&gt;Touch.ps1&lt;/a&gt;&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:cc58a96b-6b42-432d-923a-d8e777176bfb" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/F5" rel="tag"&gt;F5&lt;/a&gt;, &lt;a href="http://technorati.com/tags/DevCentral" rel="tag"&gt;DevCentral&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Unix2PowerShell" rel="tag"&gt;Unix2PowerShell&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Unix" rel="tag"&gt;Unix&lt;/a&gt;, &lt;a href="http://technorati.com/tags/PowerShell" rel="tag"&gt;PowerShell&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Touch" rel="tag"&gt;Touch&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Joe+Pruitt" rel="tag"&gt;Joe Pruitt&lt;/a&gt;&lt;/div&gt;&lt;img src="http://devcentral.f5.com/weblogs/Joe/aggbug/5979.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Joe Pruitt</dc:creator>
            <guid>http://devcentral.f5.com/weblogs/Joe/archive/2009/05/07/unix-to-powershell---touch.aspx</guid>
            <pubDate>Thu, 07 May 2009 17:09:34 GMT</pubDate>
            <wfw:comment>http://devcentral.f5.com/weblogs/Joe/comments/5979.aspx</wfw:comment>
            <comments>http://devcentral.f5.com/weblogs/Joe/archive/2009/05/07/unix-to-powershell---touch.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://devcentral.f5.com/weblogs/Joe/comments/commentRss/5979.aspx</wfw:commentRss>
            <trackback:ping>http://devcentral.f5.com/weblogs/Joe/services/trackbacks/5979.aspx</trackback:ping>
        </item>
    </channel>
</rss>