PowerShell Team

Automating the world one-liner at a time…

Latest posts

Jul 25, 2008
Post comments count 0
Post likes count 0

Invoking PowerShell from VBScript (COM)

PowerShell Team

There are a number of scenarios where you might want to call PowerShell from VBScript.  You might already have an VBScript that does some function and you want to update it to include some PowerShell operation but don't want to convert the entire script to PowerShell.  You might have some people on your staff that are very comfortable with VBScipt and aren't ready to put it down and do everything in PowerShell.  You might have a management tool that is hardwired to invoke VBScripts and doesn't know anything about PowerShell (yet!). These are some of the scenarios we thought about...

Jul 25, 2008
Post comments count 0
Post likes count 0

Naming Shells and Consoles

PowerShell Team

Recently a product team asked me what entries they should put into their Program Groups folder.  They need an entry to launch their admin GUI and to launch  PowerShell with their snapin (they could do this by launching a Minishell which is a non-extensible version of PowerShell that has that products snapins baked in or they could do this by launching PowerShell specifying a console file (-PSConsoleFile ) which has their snapins). The question was - what should they call the PowerShell link.  I thought a number of different options and then decided to look and see what the Exchange team had done.&n...

Jul 23, 2008
Post comments count 0
Post likes count 0

PowerShell Build Environment for Windows SDK

PowerShell Team

The Windows SDK team would like your feedback on what features you would like most in a future Windows SDK.  One of your choices is a PowerShell Build Environment.  If this is something that would be useful to you, go HERE and take the survey and let them know.  Cheers! Jeffrey Snover [MSFT]Windows Management Partner 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  

Jul 19, 2008
Post comments count 0
Post likes count 0

PowerShell Laptop Stickers

PowerShell Team

I think I've blogged about this in the past but I keep getting asked about the cool PowerShell sticker I have on my laptop so I'll mention it again.  The superstars at Nsoftware are giving away free PowerShell stickers HERE.  No laptop is complete without one!  :-)Hmmmm there's a thought:  "PowerShell Inside".  Jeffrey Snover [MSFT]Windows Management Partner 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

Jul 19, 2008
Post comments count 0
Post likes count 0

Shift-FileIndex

PowerShell Team

Klaus Graefensteiner has a great blog entry HERE where he publishes a great function called Shift-FileIndex.  He was scanning files which created names with indexes (e.g. Vacation_0021.jpg ).  Being the real world - things went wrong and he had duplicated pages which he then deleted which then left holes in the numbering and so on.  He is halfway through Bruce Payette's PowerShell in Action book and decided to get his money's worth and solve this problem using PowerShell to great effect. It is a very nice script which takes good advantage of Regular Expressions.  During my talk in At...

Jul 18, 2008
Post comments count 0
Post likes count 0

PowerShell ASP – Too cool!

PowerShell Team

For the longest time, people have been asking me when they'll be able to use PowerShell in ASP.  It makes perfect sense - PowerShell is a great language that let's you do amazing things quickly.  Sadly, my answer has always been: At Microsoft, to ship is to choose. We are trying to solve the problem of administrating and automating Windows and until we get things like Remoting, Jobs, Eventing, etc done, it would be a breach of our responsibilities to pursue ASP programming no matter how cool and useful it would be.  Now let me be clear, I believe ASP programming is SUPER useful to Admins (as well ...

Jul 17, 2008
Post comments count 0
Post likes count 0

Dude, Where's My Manual?

PowerShell Team

Windows PowerShell comes with a lot of help files and documents, but, somehow, my favorite and most-frequently-used help is the help that  I get by typing "Get-Help" in the console.   And I have always wondered why this help is not readily available as a  single document, ready to be viewed, searched, and printed. Well, now it is, with this simple Get-Manual script.   This script merges all of the about_* help content with cmdlet help, and puts it into one pretty formatted Microsoft Word document (.doc). Once you have this document, you can search it for specific content. Or, you can print i...

Jul 15, 2008
Post comments count 0
Post likes count 0

Atlanta Talk

PowerShell Team

I has a blast talking to a group of customers in Atlanta today about where PowerShell is and where it is going.  Attached is the deck I presented. Jeffrey Snover [MSFT]Windows Management Partner 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 Atlanta.pptx

Jul 14, 2008
Post comments count 0
Post likes count 0

Translating Literature Into PowerShell

PowerShell Team

James O'Neill got it into his head that he could translate literature into PowerShell.  He has a hilarious one-line Waiting for Godot and a one screen MacBeth HERE.  Dmitry Sotnikov picked up the challenge and has a Hamlet blog HERE. I like the idea and have decided to do the world a favor and finish the job that Jean Paul Satre's editors failed to do.  Here is "No Exit"            While ($True) { $OtherPeople = "Hell" } Exit [Monday evening update: I decided this was a better interpretation of NoExit]  I bet old Jean Paul was the life&nbs...