Posts by this author

Jan 29, 2007
Post comments count0
Post likes count0

Windows PowerShell 1.0 for Windows Vista

As Jeffery promised to you folks, today we have offically released Windows PowerShell 1.0 for Microsoft Windows Vista. Thanks to everyone for patiently waiting for this release. To download Windows PowerShell 1.0 for Windows Vista, please visit the following links: For more details, please visit the following links: Enjoy Windows Vista an...

Jan 28, 2007
Post comments count0
Post likes count0

Working With WMI Events

PowerShell V1 does not provide native support for WMI events. That doesn't mean that you can't use WMI events with PowerShell, it just means that you need to leverage the .NET classes to do so. This falls into the category of "to ship is to choose". Here is a function that you can use to work with WMI events. This function takes a WMI class name (a...

Jan 25, 2007
Post comments count0
Post likes count0

Executive Demo

I was in an executive review today where a team was demonstrating their technology (don't ask for details, I won't provide any :-) ).  At some point they brought up this beautiful graphic showing the geographic distribution of resources and then the graph was changing based upon the state of the resources.  We were all drooling like idiot...

Jan 25, 2007
Post comments count0
Post likes count0

Controlling PowerShell Function (Re)Definition

A question came up in the PowerShell news group recently where someone was asking how they could prevent functions from being redefined.  There are a couple of approaches you can use. First you can make functions read-only or constant. This is pretty straight-forward but does have some downsides. The other approach is to check to see if the funct...

Jan 25, 2007
Post comments count0
Post likes count0

NetCmdlets Beta 2 is now Available.

nsoftware has released Beta 2 of NetCmdlet, a PowerShell snapin which provides Cmdlets for a wide range of protocols.   The following is from their Release Notes: New In Beta 2 The current release is packed with new features, new functionality, and new Cmdlets for network management and Internet Communications. The following is an short ...

Jan 24, 2007
Post comments count0
Post likes count0

PowerShell Cheat Sheet Redux – the PDF version

Attached is a PDF version of Ben Pearce's PowerShell Cheat Sheet.  In the past I've encouraged everyone to speak up and complain if we were messing up or not giving you what you needed.  I'm pleased to see that you have taken this to heart (seriously).   Ben and every other Microsoft employee has been using Offic...

FAQ
Jan 24, 2007
Post comments count0
Post likes count0

PowerShell Cheat Sheet

Ben Pearce was gracious enough to put together a good looking PowerShell Cheat Sheet which I've included as an attachment to this blog post.  By definition, a cheat sheet is incomplete so this contains the things that Ben has found to be the most import.   I think you'll find it useful. Cheers! Jeffrey Snover [MSFT]Windows ...

FAQ
Jan 23, 2007
Post comments count0
Post likes count0

Array Literals In PowerShell

The first thing to understand is that there are no array literals in PowerShell J Arrays are built using operators or casts. The way to build an array in PowerShell is to use the comma operator as shown in the following examples:  $a = , 1          # array of one element $a = 1,2          # array of two elements $a = 1,2,3        # array of three ...

Jan 23, 2007
Post comments count0
Post likes count0

How to create enum in PowerShell?

[Updated to comply with the naming guidelines (create=>new)] Dynamic assembly emitting techniques can be used to create new classes or data types in PowerShell. Trick is that right permission needs to be set so that data types created in dynamic assembly can be used subsequently. Following is an example for creating a new enum ty...

Jan 23, 2007
Post comments count0
Post likes count0

Channel 9 Chat with Scott Hanselman

A while ago I had the great pleasure to interview Scott Hanselman for Channel 9.about a wide range of topics. It was a blast. Think of it as the geek equivalent of My Dinner with Andre. Ok well neither of us are as interesting as that but Scott comes close (and I did get to drop a reference to Kierkegaard which always brightens my day). If you ...