PowerShell Team
Automating the world one-liner at a time…
Latest posts
Opsware Announces PowerShell Support
Opsware's Server Automation System 6.5 now supports PowerShell. Here is what they say: Microsoft Windows PowerShell integration. Server Automation System 6.5's powerful data model is now extended to integrate Microsoft Windows PowerShell, a command line shell and scripting language, to help Windows administrators achieve a higher level of productivity. Any information about a server that is managed by the Opsware System is now accessible directly from within PowerShell. Examples include the history for every job run on a Windows server, or what applications are being supported by the server. With this integrati...
Ctrl-End it All
Here's a great hint from one of our Windows PowerShell PMs. We all know that you can interrupt a command by typing Ctrl+C, but did you know that you can erase the end of a typed command line by pressing Ctrl+End, just like in Cmd.exe? The Ctrl+End sequence erases all characters at or after the cursor point on the command line. Try it. Type a command, like: get-itemproperty HKLM:\Software\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell (Be sure to use tab-completion to save strokes!) Use the back arrow key (ß) to place the cursor under the "S"...
Channel 9 Interview with Bruce Payette
A while ago I interviewed Bruce Payette for Channel9. It was fun to do and despite that fact that I've been working with Bruce for years, I learned some new things about him (like – Bruce started out as a sparky!). You can view the interview HERE . I think you'll really enjoy it. Here is the writeup of the interview: Bruce Payette, one of the original PowerShell team members and author of the Windows PowerShell scripting language, discusses the design goals and origins of the PowerShell language. He demonstrates the ease with which PowerShell language can be used to write a PowerShell make program that controls ...
Shell or Scripting Language – It’s Shimmer!
Michael has a blog entry HERE where he opines: Actually, you could also say, it is an introduction into Windows Powershell from Microsoft. When I skimmed over the document, I came once again to the conclusion that Powershell is not really a shell, but just another scripting language. He posits the following example from the book as a proof point: get-process | ForEach-Object { write-host $_.ProcessName $_.CPU} This question came up literally dozens of times while developing PowerShell: Are we building a Shell OR are we building a Scripting Language? Over and over again the answer was the same: YES. One of...
CMD.exe compatibility
A few weeks ago I was getting Mark Russinovich up and running on PowerShell. While he liked the power the new model afforded him, he was frustrated because a bunch of things that were simple in CMD.EXE where now either hard or not available. I forget what the specific was but I think he wanted to know how to do the CMD.EXE equivalent of "dir /q". This command shows the owners of the files. Here is the output from a CMD.EXE session: Doing the same in PowerShell is quite difficult because the underlying .NET objects do not make this simple. Out of the box, we provide an alias DIR which maps to Get-ChildItem and...
Time Stamping Log Files
Per Ostergaard has an interesting blog entry HERE where he discusses the pros/cons of various options for date/time formatting for time stamping log files. He concludes the following worked best for him: "$(Get-Date –f o) Start logging" Let's see what that gives us: [0]PS> "$(Get-Date -f o) Start logging" 2007-05-19T12:20:18.2343750-07:00 Start logging That is a little chewy but once you get what it is doing, it is pretty cool. Check our Per's blog for the details. You can use this LINK to see all of Per's PowerShell blogs. Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows Powe...
Replacing cmd.exe
Scott Fulton has an interesting PowerShell article over at Betanews: Why Can't PowerShell Be the Windows Command Prompt? He has a number of great quotes from Ian McDonald. Here are a couple of my favorites: In five years' time, McDonald believes, we'll all be able to look back and identify the "inflection point" where manageability of remote servers took a giant step forward, "managing hundreds of thousands of servers with very low operations," and credit PowerShell for bringing about that change of direction. "Personally -- this is biased -- if I could set the direction of it, I would like to make PowerShell ...
The Virtuous Cycle: .NET Developers using PowerShell
I recently did an interview with Thomas Caywood of Redmond Developer Magazine about how .NET developers where finding PowerShell to be a useful tool for their development environments. I was pleased to see that he contacted a number of developers to get their stories and he included them in the article (HERE). If you think about the typical Unix developer, they are proficient in at least 3 languages: Systems programming language of choice: C, C++, Java, etc Shell programming: ksh, Bash, sh Scripting language: Perl, Python, Tcl From there they also are proficient at many more little languages: make, awk, sed,...
Microsoft Compute Cluster now has a PowerShell Provider and Cmdlets
Today the Compute Cluster group announced the release of their Tool Pack HERE. This includes a monitoring tool, a ping/pong diagnostic tool and (drum roll please……) a PowerShell Snap-in which provides a provider and a set of commands. I really like what they have done. I've include the text of their about file so that you can see for yourself. Here is a test - take a look at the file below but don't read any of the text – just look at the command examples. See if you can figure out what it is doing. Now go back and read it again with the text and ask yourself whether the text really added a lot more to your und...