I work in a Microsoft heavy environment. And because of that, I have found that PowerShell is increasingly becoming a tool I wish I knew better. So, I’m trying to grow in my understanding of how to use this tool. And the more I learn, the more I enjoy it. So, I have to give a plug to two of the resources that are really helping me learn it.

First, my wife purchased “PowerShell for SysAdmins” by Adam Bertram for me as a Christmas present and I can’t recommend this book enough. Published by No-Starch press, this book does a great job of giving you just enough information to build on the next layer without over-doing it. I’m just a few chapters in so far, but it’s already taught me so much!
Secondly, ChatGPT3 has been an incredible tool to help me to learn PowerShell. I know that others are already utilizing ChatGPT3 to learn programming and scripting, so I’m not doing anything novel here. But I have to say, it really is incredibly helpful to have a place I can simply ask questions about PowerShell and get immediate answers from a source that knows the mechanics of PowerShell even if the scripts don’t always seem to work all that well or if it makes things a little over-complicated.
Using ChatGPT3 To Learn PowerShell
For a while now, I’ve known how to do some basics with PowerShell. But I didn’t know a lot about the foundational blocks. I could act as what’s called a script-kiddie (someone who knows how to copy other people’s scripts), but couldn’t really functionally write any on my own. As I read “PowerShell for SysAdmins” I’m getting a better understanding of how PowerShell works. But there are often times when I have questions, want to figure out how to adapt what I’m learning, or how to implement a twist on something that I can’t get from a static textbook.
That’s where ChatGPT3 comes in. When I have questions, I simply ask ChatGPT3 how to do something in PowerShell. It often gives me examples, and can take the errors I receive and translate them for me to help me better understand what went wrong when I didn’t get the results I wanted. When it gives me examples of scripts, I also get short explanations and tips that I don’t get just from reading Microsoft’s blogs.
So, here’s my typical process: I attempt to figure out how to do something in PowerShell that would expedite a process I want to have automated more. I’ll ask ChatGPT3 how to write a PowerShell script that would allow me to give mailbox permissions to one user for another mailbox, how to setup SendAs permissions, along with Send On Behalf Of permissions. ChatGPT3 provides an elaborate answer which I then deconstruct and reconstruct in a simpler format that makes it easier for me to understand. I then attempt to understand the basic elements of what I’ve been provided by ChatGPT3 by reading through “PowerShell for SysAdmins”.
I’ll also take what I’m learning in Bertram’s book and seek to clarify anything I don’t understand by returning back to ChatGPT3. When I get an error code, I copy and paste that into ChatGPT3 and give it the context of what I was attempting to do and even copying and pasting the original script into it and asking it what the error code indicates I did wrong.
Pros and Cons of ChatGPT3
I think that ChatGPT3 does a really good job of providing what you need when you ask the right questions. But it is a matter of knowing how to ask for what you are wanting. Additionally, ChatGPT3 overcomplicates simple requests by turning everything into a variable even if it’s only a few lines of commands. But having the ability to check your work, ask questions, and get solid answers makes it a tool, well worth checking out.

Leave a comment