Kevin Hill gets into Powershell:
What follows is a step by step of how I expanded on the most basic command to get more and more out of it. I spent a lot of time on MSDN looking up cmdlets, and on Stack Overflow twice with basic questions. Even went to my “DBA” Twitter feed early in the process using #sqlhelp since a lot of my colleagues are veteran PoSH users.
Warning…its very possible I’ve gained a syntax error here and there when copying and formatting this into a post…run at your own peril 😉
One bit I’d recommend is using Out-GridView for occasional display and potentially getting rid of the Excel requirement.
on Out-GridView…I was actually using that in testing, selecting rows and then dump to Excel….but for dozens of servers it got to be manually intensive…CSV was needed for this task.