Now that you’ve convinced your security team that PowerShell improves your security posture, it’s time to learn PowerShell if you haven’t already.
Month of Lunches
Hands down, the one book most people recommend for learning PowerShell is Learn Windows PowerShell in a Month of Lunches by Don Jones and Jeffrey Hicks. You can buy the 3rd edition from Amazon or directly from Manning.
This book even comes with its own YouTube series, featuring author Don Jones.
There’s also a website called More lunches but it hasn’t been updated since 2014 while the most recent version of Learn Windows PowerShell in a Month of Lunches was released in 2016.
Once you’re comfortable with PowerShell, check out the PowerShell Cookbook by PowerShell Team member Lee Holmes and Windows PowerShell in Action by PowerShell Team member Bruce Payette and MVP Richard Siddaway.
The PowerShell Cookbook provides “recipes” of solutions, but I like that it’s also useful for learning best practices. Lee’s code is great to learn from! PowerShell in Action tells an amazing story and discusses the “Why” in-depth.
You can also check out The PowerShell Conference Book:
This book is designed to be like a conference in a book where each chapter is written by a different author who is a subject matter expert on the topic covered in their chapter. Each chapter is also independent of the others so you can read one chapter, ten chapters, or all of them. You can start with the first chapter, the last one, or somewhere in-between and not miss out on anything related to that particular topic. This book is written for the intermediate to advanced audience. Prior experience with PowerShell is highly recommended.
All (100%) of the royalties from this book are donated to the OnRamp scholarship program. More information about the OnRamp track at the PowerShell + DevOps Global Summit and their scholarship program can be found on the PowerShell.org website.
The ISE is no longer being developed and Microsoft officially says:
The PowerShell ISE has been the official editor for PowerShell throughout most of the history of Windows PowerShell. Now with the advent of the cross-platform PowerShell Core, we need a new official editor that’s available across all supported OS platforms and versions. Visual Studio Code is now that editor and the majority of our effort will be focused there.
However, the PowerShell ISE will remain in Windows supporting Windows PowerShell with no plans to remove it. We will consider investing effort there in the future if there is a high demand for it, but for now we think that we will be able to provide the best possible experience to the PowerShell community through Visual Studio Code.
Nearly everyone I know uses VS Code and new cool extensions are added or enhanced every day in the Extension Gallery. There are so many cool extensions like gitlens which allows you to see who wrote a specific line of code:
You can also share your screen with colleagues using Visual Studio Live Share.
You may notice that I still use the ISE for demos, but that’s because it has a ▶ button and the ISE is very stable. Last time I tried to use Code for a demo it bombed out and the last thing I want to worry about during a presentation is my IDE crashing.
So for now, I’m using ISE for demos. I’ve heard the newer versions of Code are more stable, so now I’ve just gotta make the time to give it another shot.
Microsoft Virtual Academy
Microsoft Virtual Academy has a few solid PowerShell videos, too, like Getting Started with PowerShell 3.0: Don’t fear the shell and Advanced Tools & Scripting with PowerShell 3.0: Get Started.
Note that this is for PowerShell 3 but it’s still relevant as dbatools is designed to work with PowerShell 3 and above.
And, of course, the regularly scheduled PSPowerHour which is “like a virtual PowerShell User Group, with a lightning-demo format, and room for non-PowerShell-specific content.” Eight community members give a demo each PowerHour.
PWSHSchool is all about gaining/sharing experiences. Join in to learn about PowerShell interactively, by using PowerShell!
Microsoft Docs is updated regularly, easy-to-read, and useful.
- SQL Server Slack
- In #powershellhelp and #dbatools
- PowerShell Slack
- Every channel, but #sqlserver is bridged to the SQL Community #powershellhelp channel 👍
- Reddit /r/PowerShell Live Chat
There are a ton of PowerShell User Groups across the world! Check out PowerShell User Groups on Technet.
For dbatools specifically, we have a number of posts that can help navigate our module on our blog. Here’s a sampling:
- getting started
- walk-thru: installing modules from the powershell gallery
- offline installs of dbatools
- real-world tde database migrations
- building a dedicated backup test server
- creating a history timeline
- simplifying snapshots
- managing a central management server
- stuck on older versions of sql server? check out our trace commands.
- three ways to track user logins
- minimal-downtime migrations using invoke-dbalogshipping
- a new command to find all of your instances
- simplifying extended events management with dbatools
- simplifying disaster recovery with dbatools
Hope that helps those of you looking to get started. If you have any suggestions for this list, please let me know.