Learning PowerShell
I've seen several people ask for the best way to learn PowerShell. As a person with no previous scripting knowledge, I have been learning PowerShell and have already created several pretty lengthy scripts. So are you interested in learning? If so, here's what I did and it may help you out in the future.
Go through this guy's tutorials before anything else:
http://www.powershellpro.com/
Then go through this book:
http://www.amazon.com/Microsoft-PowerShell-Programming-Absolute-Beginner/dp/1598633546/ref=sr_1_1?ie=UTF8&s=books&qid=1227659316&sr=8-1
Then go through about 50-60% of this book (the rest is too much for an admin and more for devs):
http://www.amazon.com/Windows-PowerShell-Action-Bruce-Payette/dp/1932394907/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1227659351&sr=8-1
At the time of this posting, I am going through the PowerShell Cookbook Some of the stuff is over my head but it has excellent snippets that you can use as well as excellent Appendixes which list out common COM Objects you would use as an Administrator, common type classes, etc...
http://www.amazon.com/Windows-PowerShell-Cookbook-Exchange-2007/dp/0596528493/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1227659542&sr=8-1
After I'm finished with the Cookbook I will be going through this AD PowerShell book:
http://www.sapienpress.com/ad.asp
PowerShell Technology Center which includes a link to the Scripting Repository Center. Ed Wilson just became the new Scripting Guy and will be focusing on adding lots of PowerShell content to the site.
http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
Don't forget to read these PowerShell tips:
http://www.microsoft.com/technet/scriptcenter/resources/pstips/archive.mspx
PowerGUI (Free Script Editor):
http://powergui.org/index.jspa
Primalscript (Not-Free Script Editor)... One thing to note about Primalscript is that 2009 is coming out in early 2009 and will have lots of PowerShell stuff integrated. I'll be purchasing this when it's released.
http://www.primalscript.com/
There's quite a bit of other stuff out there but you'll learn the good community sites as you learn PowerShell and need to look stuff up. Hope this helps!
Go through this guy's tutorials before anything else:
http://www.powershellpro.com/
Then go through this book:
http://www.amazon.com/Microsoft-PowerShell-Programming-Absolute-Beginner/dp/1598633546/ref=sr_1_1?ie=UTF8&s=books&qid=1227659316&sr=8-1
Then go through about 50-60% of this book (the rest is too much for an admin and more for devs):
http://www.amazon.com/Windows-PowerShell-Action-Bruce-Payette/dp/1932394907/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1227659351&sr=8-1
At the time of this posting, I am going through the PowerShell Cookbook Some of the stuff is over my head but it has excellent snippets that you can use as well as excellent Appendixes which list out common COM Objects you would use as an Administrator, common type classes, etc...
http://www.amazon.com/Windows-PowerShell-Cookbook-Exchange-2007/dp/0596528493/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1227659542&sr=8-1
After I'm finished with the Cookbook I will be going through this AD PowerShell book:
http://www.sapienpress.com/ad.asp
PowerShell Technology Center which includes a link to the Scripting Repository Center. Ed Wilson just became the new Scripting Guy and will be focusing on adding lots of PowerShell content to the site.
http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
Don't forget to read these PowerShell tips:
http://www.microsoft.com/technet/scriptcenter/resources/pstips/archive.mspx
PowerGUI (Free Script Editor):
http://powergui.org/index.jspa
Primalscript (Not-Free Script Editor)... One thing to note about Primalscript is that 2009 is coming out in early 2009 and will have lots of PowerShell stuff integrated. I'll be purchasing this when it's released.
http://www.primalscript.com/
There's quite a bit of other stuff out there but you'll learn the good community sites as you learn PowerShell and need to look stuff up. Hope this helps!
“For success, attitude is equally as important as ability.” - Harry F. Banks
Comments
I do. The reason I didn't link it is it's more geared towards just the Exchange Management Shell and not scripting itself. So it's more for learning Exchange commands rather than scripting. But of course you have to know what the commands are in order to script for it, but it still doesn't teach you scripting.
And yes, the PowerShell Cookbook is very good. I really like the Appendices.
I was scripting something a few days ago on how to take a list of users from a CSV file (their Display Name) and get their DN but was getting frustrated at something so I did it differently. I read a snippet today and realized why it didn't work.
One cool thing I always do with output is create the custom PSObject and add data to it. The reason I do this is instead of returning output directly to Format-Table or Format-List, the PSobject allows you to display output to the console but still choose if you want to FT, FL, Export to File, CSV, etc... It really gives you a lot of flexibility on how you want your code outputted.
Let cmdlets do the work for you. Quest AD cmdlets can do this out of the box.
http://www.quest.com/powershell/activeroles-server.aspx
profile: linkedin.com/in/astorrs
I'd rather do it the way I did it learn how to script as Quest AD cmdlets most likely won't even be used in Server 2008 R2 as all the cmdlets will be built into Server 2008 R2 and more.
There are numerous ways to skin a cat, and to each his own. I just want to skin it faster.