Identifying Problems

Problems, like the poor, are with us always.  The trick is what to do about them.  I recently told my boss about a previous job where someone had resigned and during the exit interview, they cited a particular problem as the reason for leaving. Had I known about the problem, I would have happily addressed it but I didn’t know about it until the person was leaving the company.  The lesson is:

People can only solve the problems they know about.

Continue reading

Write-Host Considered Harmful

[2023 Update]  

I’ve been meaning to update this for a while.  The advice in this post is no longer current.  A while ago we changed the implementation of Write-Host to being a wrapper on top of Write-Information.  Prior to this, when you used Write-Host, there was no way to capture and process the data you wrote – because it just wrote to the host.  Now that it uses Write-Information, it goes through a path that writes to the host AND allows you to capture and process that information.
-Jeffrey Snover

[End 2023 Update]

When you are writing or reviewing PowerShell scripts, I’d like you to remember the following rule of thumb:

Continue reading

Evolution of a Script: Timing Operations

I just love PowerShell!  One of the things I love the most about it is that you can pick the level of programming you want, write a script and then evolve it to meet whatever need you have.  Sometimes you want something quick and dirty and other times you want something you’ll share with others and then other times you want something that is going to be used in production. Continue reading