A New Virtual Earth Mashup in Born

About 8 months ago, I wrote a Virtual Earth mashup to display commute times to Microsoft in and around the Seattle area. It’s been very successful, and solves a big problem for many people looking to buy a house (amongst other things.)


http://www.leeholmes.com/projects/commute

About 3 or 4 months after posting the mashup, the Virtual Earth team changed a bunch of the APIs, which pretty much broke every existing …

Read more

Writing PowerShell Cmdlets vs. Writing PowerShell Providers

A question that sometimes comes up is, “When do I write a PowerShell provider instead of a cmdlet?” To explain that, it is useful to understand how PowerShell distills management concepts for administrators.

In the pre-PowerShell world, the command-line management experience is fairly fractured. You have a huge number of awkwardly named commands, with no way to quickly determine what they mean. Many of …

Read more

Load a Custom DLL from PowerShell

One of the amazing features of PowerShell is its amazing reach.  You can interact with the file system, the registry, certificate stores, COM, WMI, XML, cmdlets, providers … the list seems to go on forever.

One important extension point is the ability to seamlessly interact with .NET DLLs. These are most commonly shipped in SDKs, and many people have made use of this.  For example:

  • Sharepoint: …
Read more

Email Quoting and Wrapping in 59 Bytes

Here’s a useful bit of line noise that I came up with when I wanted to put some quoted text into email.  Starting with unwrapped text in the clipboard:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in …

Read more

Get-HelpMatch - Search Help (Apropos) in PowerShell

To give a glimpse into the writing process behind my upcoming “Windows PowerShell - The Definitive Guide” (O’Reilly,) I’ll occasionally post entries “as the author sees it.”  The first in this series shows how to search the PowerShell help content for a phrase or pattern.

Program: Get-HelpMatch¶

Both the Get-Command and Get-Help cmdlets allow you to search for command names that …

Read more

Counting Lines of Source Code in PowerShell

Oren Eini recently ran into some performance problems while using PowerShell to count the number of lines in a source tree:

_I wanted to know how many lines of code NHibernate has, so I run the following PowerShell command…
(gci -Recurse | select-string . ).Count
The result:
(Graphic of PowerShell still working after about 5 minutes, using 50% of his CPU.)
Bummer.
_

The performance problem from this command comes from …

Read more

Updated: PowerShell Profile Locations Rationale

You may have noticed that we changed the location of the default profiles yet again! 

The one in “My Documents” is now under “WindowsPowerShell,” rather than “PsConfiguration.”
The one in “All User’s Documents” is now under the installation root.

Since you are probably wondering why, I’ve updated my last explanation: The Story Behind the Naming and Location of …

Read more

Great PowerShell Screencasts

Several people have been churning out screencasts lately, and they are really great resources.

On the Channel9 front, David Aiken recently posted two DFO Show screencasts:

In addition, Doug Finke and the Lab49 team just posted an overview of some PowerShell features – Variables, Arrays, Hashtables, Functions, and PsObject.

For interactive …

Read more

DasBlog Upgrade to 1.9 Complete!

Now that DasBlog 1.9 has been released, I’ve finally upgraded.  Everything appears to have gone well, and I’m really happy with some of the new themes available.  You won’t necessarily notice this if you only read the site through your RSS reader, so why don’t you come on down and check out the new look? :)

Please let me know if you see anything broken!

O'Reilly PowerShell Quick Reference Now Available

My O’Reilly PowerShell Quick Reference is now available – a 120-page guide (in PDF format) that provides the essential reference material for your day-to-day use of PowerShell.  With a concise explanation at your fingertips, there is no need to memorize esoteric topics like regular expressions and string formatting specifiers.

Aside from its straight factual reference material, the Quick Reference also provides …

Read more