PowerShell Team
Automating the world one-liner at a time…
Latest posts

Managing Datacenter Machine Names

One of the first things managers of large scale datacenter do is to produce a regular naming scheme for their servers. These often embed the function, location, and then an integer. e.g. IIS-West-001 IIS-West-002 ... IIS-West-234 or ShareP-Tuk-001 ShareP-Tuk-002 ... ShareP-Tuk-010 PowerShell's range operator is awesome for working with these environments. If you haven't already discovered it, the Range Operator is .. - it takes any 2 integers and generates all the numbers between them (including them). An example is worth a thousand words: PS>1..3 1 2 3 ...

-ErrorAction update

Responding to my blog entry on -ErrorAction HERE, Jon Newman reminded me that the reason we didn't use the term IGNORE for -ErrorAction was that we don't really ignore the error. We still record it in $ERROR. He also reminded me that I should have talked about $ErrorActionPreference. This variable defines the action that will occur if the user does NOT specify what to do on the commandline. Check it out: PS>$ErrorActionPreference Continue PS>Stop-Process 13,23 Stop-Process : Cannot find a process with the process identifier 13. At line:1 char:13 +...

PowerShell on Linux, Solaris, Mac, PHONES!!! etc

Igor Moochnick announced the first release of PASH, an open source implementation of PowerShell. (I tripled check the date on his blog to make sure it really said April 6th and not April 1st. :-) ). This is really exciting stuff. This is one of the most requested items from IT shops that run heterogeneous environments. They love PowerShell and want ALL their IT Pros to adopt it. I haven't tried it yet so I don't know what it does/does not implement but I'm pretty excited about it. I can't wait to give it a try. I'll have to talk with the .NET guys about how they work with the ...

PowerScripting Podcast 3/19/08 Part 2

Part 2 of my interview for the PowerScripting Podcast is now available HERE. Enjoy! Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

-ErrorAction SilentlyContinue => -EA 0

In PowerShell, we draw the distinction between terminating and non-terminating errors. The way to think about the distinction is a what should happen if I pipeline a set of objects to an operation. There are certain errors which mean that there is little to no change that any subsequent object could be processed correctly (for instance if you had a connection that got lost). These are terminating errors. Then there are errors that have no effect on the next operation (for instance, just because you couldn't kill one process doesn't mean you won't be able to kill the next one). Thes...

Apologies to Lee Holmes

10,000 apologies to Lee Holmes for not including his book in the Tower of Power pic (it was next to my keyboard - note all the bookmarks). Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

How Microsoft Works

People often look at Microsoft and scratch their heads. One of the things I want do with this blog is to give people a peek behind the curtains so you understand how things really work. My hope is that once you understand some of this, our actions and attitudes will be a little less befuddling. One of the things you need to understand about Microsoft is that we spend > $7 Billion a year in R&D. Now couple that with the fact that everyone here works super hard on their stuff and you see why teams find it virtually impossible to keep up with with what is going on with various technologies....

Tower of Power – Part 2

I was thrilled to get a copy of Arnaud Petitjean's new Powershell book (in French) and add it to my Tower of Power (below). I've got to tell you, if I'm ever having a bad day - I just look at the Tower of Power and things get better! Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

PowerShell Remoting using SSH!

Can't wait for us to ship PowerShell Remoting? Want remoting to use SSH? Why wait for us? /N software has just announced a beta of their NetCmdlets V2.0 which provides PowerShell remoting over SSH today! They've had this for a while and V2 updates (and improves) the usability of the cmdlets as well as adding a bunch of new and exciting commands. For example, chances are that you won't ever see Microsoft ship the [get/send]-s3 cmdlets but /n software V2 does. :-) Check it out! Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at:...