PowerShell Team
Automating the world one-liner at a time…
Latest posts
PowerShell Laptop Stickers
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
Shift-FileIndex
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...
PowerShell ASP – Too cool!
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 ...
Dude, Where's My Manual?
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...
Atlanta Talk
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
Translating Literature Into PowerShell
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...
Speeding Up PowerShell Startup
I talked about this before but a number of people have missed it so here it is under a better title. In V1, we had a problem which caused our assemblies to not get ngen'ed during installation. If you don't know what "ngen" is, don't worry - you don't need to. All you need to know is that we didn't do the step that makes things go fast on your machine. The instructions for how to fix this are HERE. You should stop what you are doing and go run that script. If you've already done this in the past, it will be harmless but if you haven't, you'll be amazed at the improvement in star...
Bash vs PowerShell
Marcus Nasarek did a nice comparison of Bash vs PowerShell in Linux magazine HERE. It is only 2 pages but he covers the key elements and has been very fair to it. I appreciate the fact that he took the time to clearly understand PowerShell. In the past, a number of people in the Linux community have assumed they knew what we were doing and did comparisons based upon their assumptions. Those weren't very interesting. Enjoy! Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at: http://blogs.msdn....
Show-SnapinCmdlet
Shay Levy has a review of the latest/greatest IIS PowerShell provider CTP2 HERE. In that review, he shows how you can use Get-Command to show all the cmdlets in a snapin. That works great but produces a linear list of cmdlets. I think the following produces a easier way to digest the information: function Show-SnapinCmdlet ($snapin, $column=6){ Get-Command -PSSnapin $snapin | sort Noun,Verb | Format-Wide -GroupBy Noun -Property Verb -Column $Column } Give it a try and see if you like it. Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team b...