PowerShell Team

Automating the world one-liner at a time…

Latest posts

Feb 2, 2007
Post comments count 0
Post likes count 0

Payette Podcast

PowerShell Team

Superstar Scott Hanselman interviewing superstar Bruce Payette – does it get any better? Bruce is a dev lead on PowerShell and author of Windows PowerShell in Action.  Jeffrey Snover [MSFT]Windows PowerShell/MMC ArchitectVisit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Jan 31, 2007
Post comments count 0
Post likes count 0

PowerShell Benefits Over COM Scripting

PowerShell Team

On an internal email thread, someone asked Vivek Sharma why they should implement PowerShell. They knew that PowerShell provided scripting but they had a COM interface which already gave them scripting so the question was – what, if any, were the additional benefits to doing PowerShell. Vivek gave a great answer that I thought I would share with you:  Any guesses why I'm a charter member of the Vivek Sharma fan club? The Exchange team totally got PowerShell when other people looked at us like we had a rat's tail hanging out of our mouths. They are a high IQ team. Jeffrey Snover [MSFT]Windows PowerShell/MMC ...

Jan 30, 2007
Post comments count 0
Post likes count 0

PowerShell Cheat Sheet – Now in XPS

PowerShell Team

I originally published Ben Pearce's PowerShell Cheat sheet in Word 2007 format. Given that I posted it a week before the Office 2007 launch, it turned out that not many people could read that so I posted it in PDF format as well. It now turns out that the corporate direction is to use XPS (I'm told that XPS viewers are readily available). Attached is an XPS version. I'm hoping that I can stop there and avoid publishing it in TROFF, TEX, SMGL, DECWriter, or any other formats. J Jeffrey Snover [MSFT]Windows PowerShell/MMC ArchitectVisit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShellVisit...

Jan 29, 2007
Post comments count 0
Post likes count 0

Virtual Machine Manager’s PowerShell Support

PowerShell Team

One of the cornerstone features of System Center Virtual Machine Manager (SCVMM) is PowerShell. They have built their entire GUI layered on top of PowerShell in the same way that Exchange 2007 did. A little while ago, I talked to Rakesh Malhotra (the Group Program Manager for SCVMM) about how things were going and he was very pleased with their bet on PowerShell. He talked about how their task-oriented Cmdlets provided a very user approachable scripting experience. I asked him for a few examples so he sent me a set of comparisons with VMWare's scripting experience (the VMWare script came from their website: ...

Jan 29, 2007
Post comments count 0
Post likes count 0

Windows PowerShell 1.0 for Windows Vista

PowerShell Team

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 and Windows PowerShell Hemant Mahawar [MSFT]Program ManagerWindows PowerShell

Jan 28, 2007
Post comments count 0
Post likes count 0

Working With WMI Events

PowerShell Team

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 (and optionally a path to a namespace [it defaults to root\cimv2]) and gets the events until you enter ESCAPE or 'q' at the keyboard. Function Get-WmiEvent ($class, $Path="root\cimv2"){$ESCkey = 27$Qkey = 81$query = New-Object System.Management.WQlEventQuery "Select * fr...

Jan 25, 2007
Post comments count 0
Post likes count 0

Executive Demo

PowerShell Team

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 idiots when I happened to look at the title bar which said:  "PowerGadgets"!!!    You could have knocked me over with a feather. It really proved what I told the PowerGadgets team - people are going to love PowerGadgets because it makes them look awesome....

Jan 25, 2007
Post comments count 0
Post likes count 0

Controlling PowerShell Function (Re)Definition

PowerShell Team

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 function exists and only create it if it isn't already defined.  First we'll look at defining read-only or constant functions. There isn't a way of doing this with the function keyword in V1.0 of PowerShell. Instead, you have to do this through the function namespace prov...

Jan 25, 2007
Post comments count 0
Post likes count 0

NetCmdlets Beta 2 is now Available.

PowerShell Team

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 list of some of the new and exciting features we added to this release: Networking Tools for IT Professionals The current package contains the following Cmdlets: I am particularly excited about the combination of PowerShell and NetCmdlets for produc...