With MS ramming powershell into all new server products, I\'m starting to (reluctantly) think I need to take it seriously. Part of \"taking it seriously\" is TDD. Have you f
I think you're asking about "testing strategies" instead of TDD specifically, so I'll answer both questions.
The bulk of your work in PowerShell will be integrating a bunch of disparate systems via cmdlets and object pipes. If you want to be confident your PowerShell scripts work, put as much effort as possible into building a perfect staging environment, so as to test all these systems as accurately as possible.
Running your scripts in a perfect staging environment will be infinitely more valuable than "fleshing out your design" via TDD or "testing your code's intent" with after-the-fact unit tests.
Small notes that may help:
-whatif
switch exists on built-in cmdlets. Also I just found out you can do this as well: -whatif:$someBool
- you'll know when you need it.