Tools

Slide Deck and Code I presented at the NYC Code Camp 2010

March 7th, 2010 / Development in a Blink

I gave a PowerShell Deep Dive talk at the NYC Code Camp. You can get the zip file that is posted.

It was a great group of people. Lot’s of discussion around using PowerShell interactively, extending apps from a maintenance point of view to reduce complexity and UI extensibility by embedding the PowerShell engine into GUIs.

I want to thank Lab49, where I work,  for being a platinum sponsor of the event. Also thanks to the volunteers and organizers who offered up their Saturday from 5AM till the evening to ensure the sessions run smoothly.

Visual PowerShell

February 27th, 2010 / Development in a Blink

Devfarm Software has released PowerWF Studio.

PowerWF Studio™ unleashes the potential of Microsoft PowerShell and Windows Workflow Foundation by providing a visual integrated development environment (IDE) that virtually eliminates the need to write scripts.

Also check out their features page to learn about agents, VMXBuilder tools, deployment options and activity packs.

PowerShell Deep Dive – I’ll be speaking at the NYC Code Camp 2010

February 21st, 2010 / Development in a Blink

Saturday, March 6th, 2010. Thank you to the NYC Code Camp reviewers for selecting my talk.

I’ll be giving one of the 75 minute presentations at the all-day event.

I am looking forward to presenting and sitting in on the other sessions as well.

PowerShell WASM – Windows Azure Service Management

February 20th, 2010 / Development in a Blink

Looks like interesting steps towards infrastructure automation.

There was an immediate demand for an automation API that would fit into the standard toolset. Given the adoption and penetration of PowerShell, we determined that cmdlets would be the most effective way forward.

  • WASM Cmdlets Updated blog post
  • MSDN Code Gallery Project

  • PowerShell and MSBuild Extensible Task Factories

    February 20th, 2010 / Development in a Blink

    One of the cool new features of MSBuild 4.0 is the extensible task factory. Writing your own task factory will allow you to write inline tasks in Perl, Python, or in this case… Windows PowerShell.

    Blog post MSBuild Task Factories: guest starring Windows Powershell.

    Sample task factory on MSDN Code Gallery MSBuild Windows PowerShell Task Factory.

    Microsoft MVP Summit 2010

    February 16th, 2010 / Development in a Blink

    There are some 1,300 technical experts from around the world here to participate  in the summit. I am sitting in the Hyatt in downtown Bellevue Washington drinking a tall drip from Tully’s. Today there are several welcome keynotes and community sessions.

    I have seen a few book authors, CodePlex contributors and others  I follow in  the twittersphere.

    Tomorrow starts the all day presentations at the Microsoft campus for each specific technology. I am looking forward to meeting the PowerShell team and other PowerShell MVPs in person. I won’t be able to blog much, NDAs are in effect.

    Using PowerShell To Consume data from Microsoft “Dallas”

    February 12th, 2010 / Development in a Blink

    Dave Thompson posts Consuming data from Codename “Dallas”. He outlines how to retrieve data using C# and VB. Plus he provides links to overviews and Channel 9 resources.

    Microsoft® Codename "Dallas" is a new service allowing developers and information workers to easily discover, purchase, and manage premium data subscriptions in the Windows Azure platform.

    PowerShell Version

    You can grab the PowerShell scripts below. The scripts download the data from a Dallas Url, transform the results to PowerShell objects and then pipes the results to Out-DataGrid for previewing and filtering.

    Auto-scaling in Azure with PowerShell Cmdlets

    February 7th, 2010 / Development in a Blink

    This post Auto-scaling in Azure shows a proof of concept for auto-scaling an Azure Solution and the different options that you have for implementing a similar solution.

    At the end, the author provides a PowerShell example using the Windows Azure Service Management CmdLets

    Add-PSSnapin AzureManagementToolsSnapIn            
    
    Get-HostedService $serviceName -Certificate $cert -SubscriptionId $subId |
    Get-Deployment -Slot Production |
    Set-DeploymentConfiguration `
      {$_.RolesConfiguration[$roleName].InstancesCount+=1}
                

    PowerShell New-PSCustomObject

    January 24th, 2010 / Development in a Blink

    Karl Prosser posts a PowerShell script quick and dirty new custom object as a way to create PowerShell objects on the fly. I’ve come across the need for this and posted an approach PowerShell Function Factory after reading up on Managing Records in Python.

    Yet Another Approach To Building Custom Objects

    This function peels off two items at a time placing them in $key and $value, $list gets the remainder (it has two fewer items now). Then key/value pair is added to the $Properties hash table. The while loop continues until $list is empty.

    Solving ActionScript Puzzlers in PowerShell

    January 20th, 2010 / Development in a Blink

    Andy Bryant has some ActionScript Puzzlers over here. So, let’s try them in PowerShell.

    So the question is what does the call to loopy() return?

    The answer is BEE,BOP,BOP,BOO. The extra BOP is the same result as the ActionScript and the same reason:

    Although it appears that caps is defined only within the for loop, it is actually defined at the scope of the function. Therefore for the second null in the array, caps was not overwritten, but instead retained its value from the previous iteration of the loop.

    PowerShell can change the way you work with SQL Server forever

    January 10th, 2010 / Development in a Blink

    O’Reilly Webcast: PowerShell for the SQL Server DBA

     

    Useful for developers working with SQL Server too.

    Godmode – In a Single line of PowerShell

    January 5th, 2010 / Development in a Blink

    It’s been making the rounds how to set this up as a folder.

    This neat little admin feature for Windows 7 called ‘Godmode’ is definitely worth setting up and very easy to complete. Allowing you to see all system control panels in one place for easy access.

    Lee Holmes, author of Windows Powershell Cookbook, tweeted this function. Put it in your profile for instant access.

    Function Godmode { Start 'shell:::{ED7BA470-8E54-465E-825C-99712043E01C}' }

    10 PowerShell Posts I Did in 2009

    January 1st, 2010 / Development in a Blink

    I had fun doing these PowerShell posts.

    image 

    Try PowerShell – An Interactive Tutorial

    Michael Foord inspired this with his Try Python Silverlight application

    How to Host PowerShell in a WPF Application

    A How To video

    PowerShell Out-ExcelPivotTable – Quickly Create Pivot Tables in Microsoft Excel

    Automating Excel Pivot tables with PowerShell

    PowerShell, An Exercise in Species Barcoding

    Inspired by Peter Norvig’s (Director of research at Google) python version

    PowerShell – Find the K most common words in a file

    Based on Jon Bentley’s approach in “Little Languages”

    Add Ornaments to a Christmas Tree With PowerShell in WPK

    December 26th, 2009 / Development in a Blink

    James Brundage posted a quick Christmas tree written in WPK (the WPF PowerShell Kit). Check out his code.

    this script has tons of Christmas goodies

    image

    Adding Ornaments

    Using the WPF Ellipse and bitmap effect gives the following. I need to investigate how to get the resized behavior to work again.

    image

     

    PowerShell Help Reader in Silverlight

    December 26th, 2009 / Development in a Blink

    Plus an install version based on WPF. http://powershelltools.com/

    via Jeffrey Snover

    PowerShell (in the Cloud) Azure Sample

    December 23rd, 2009 / Development in a Blink

    Marco Shaw, PowerShell MVP, posts on building and deploying the MDSN Code Gallery Sample for hosting PowerShell in Azure.

    Here is his hosted application.

    Tainted Peanut Butter, The Sequel: PowerShell, DGML and Visual Studio 2010

    December 20th, 2009 / Development in a Blink

    Grab the PowerShell code below, it easily creates DGML, Directed Graph Markup Language, from a piped input stream. Then view the graph in Visual Studio 2010 .

    Here is another link Cool New Graph Visualization Technologies in Visual Studio 2010.  Plus, look at another PowerShell version using the Microsoft Research tool NodeXL PowerShell, Visualize the Peanut Butter Recall Data.

    Tainted Peanut Butter

    The viewer for directed graph documents  in VS 2010 has several nice features: zoom, pan, drill down, right/left/directed layouts and more. Using the same dataset (comma separated values) as I did in the NodeXL version, it was quick work to generate the Xml representation for this graph.

    We’ll still be reinventing ourselves as parallel programmers 12 years from now

    November 27th, 2009 / Development in a Blink

    said Burton Smith, a Microsoft technical fellow and expert on parallel programming languages.

    Microsoft’s top developers prefer old-school coding methods

    Video of the panel discussion at PDC09. The article captured key highlights the panel was quite good.

    PowerShell: How to Calculate the Number of Days from the Beginning of the Year

    November 23rd, 2009 / Development in a Blink

    Some systems I work with require dates in the form YYYYDDD, where DDD is the number of days since the beginning of the year. For example, Feb 1, 2009 is the 32 day from the start of the year, 2009032.

    Here is a PowerShell function to calculate and format the result. A few things it demonstrates, using a ‘formula’ in the range operator, a begin/process/end block in a ForEach and using the current object ($_) to do a lookup in a hash table.

    image

    image

    The Code

    Function Get-NumberOfDaysToDate ([datetime]$date=(Get-Date)) {

    Get Functional

    November 21st, 2009 / Jakub Korab » technology

    That was the message that was coming through the Devoxx conference presentations this year. The idea that it will help your code run in the brave new world of multi everything (multi-core, multi-thread etc.) is one that’s widely touted, but rarely the primary driver for its use. Instead, it’s about less code, that’s more easily understood. When you do get to scaling it, it won’t do any harm either.