Enhancing Employee Skills with PowerShell in Empath

Wes Spencer builds a PowerShell safety lesson in Empath LMS for MSP staff. The lesson combines a YouTube video, example scripts, and a quiz to teach employees how to spot unsafe scripting practices. Spencer used GPT to draft the content and recommends Azure Shell for a safer lab environment.
Chapters
What's up, my Pack-a-Derm Posse? I am here today to show you a little bit more about some cool things you can do in Empath. Today we're really going to kind of connect together a few dots from some of the past videos we've made showing how we can combine video content, text content, iframe content, and our knowledge check feature to actually really make something that is approaching being a lab where an employee can actually practice a demonstrable skill at our MSP. And I also want to show you how easy this all is to put together because yes, I am asking you to do some work and it can feel like it is a lot. This took me about 20 minutes to throw together. Someone who knows what they're talking about in a minute will probably look at some of what I did here on PowerShell and will be like, yeah, it looks like it took 20 minutes. Way to go, seen. That's not the point. I am not a scripting expert. I'm trying to demonstrate an LMS. So let's get into it. Before we get into the actual lesson here, I just want to point out something I like to point out every time. Make sure on your browser that app.empathmsp.com is punched through any sort of tracking cookie blocker or ad blocker that you have. I use Privacy Badger and uBlock Origin, and I have to make sure I whitelist Empath in order for lesson tracking data to move properly. Okay, so we are in the DNS lesson in my demo tenant that I often use and build on for these calls. And we've added to it. If you remember, last couple of videos, we talked about using iframes. Previously, we talked about how to import a video, how to make a quiz. Well, I've now combined all of that here, where I have added in a lesson that's going to talk about PowerShell scripting, It's related to DNS, and then a quiz to confirm that the employee understood the basics of that scripting. Let's get into that. So first I'm going to show you what I already built, and then I'm going to show you how you can go ahead and build it yourself. So if we go into this new lesson I've added, which I've called PowerShell for Weaponized Idiots, one of the things I'm trying to solve here for— well, we had a relatively entry-level employee, they've gone through, they've done the basics of DNS. And now they're in our environment where they're probably using our RMM, and at some point they're going to have to troubleshoot DNS. And well, we're an MSP, we want them to be efficient. So we probably want them to use a script. And we're just going to assume that this employee doesn't know anything about PowerShell and just going to download a script off the internet. Well, that's kind of dangerous. So we want to teach someone the bare minimum to at least have a chance to identify when a script they've downloaded or someone else gave them could be dangerous. So what we have in this lesson, first I have a video I imported from YouTube, uh, that's really great. That just talks about the basics of PowerShell. You'll notice that there are instructions here that I have put into the lesson, which I am a big fan of doing when you create your own lesson, is making explicit instructions that explain exactly what you want the employee to do. And you'll see I go in these instructions so far as to even tell the employee to take a quiz and put notes in the ticketing system. And over here on the side, we have some lesson resources. We have some example scripts. So keep that in the back of your mind. And we have video and we have lesson text. So if we come in here and we read the instructions, we will see a few things right out the gate. We have a lesson objective. So we want the employee to understand the point of this. They're gonna evaluate the quality and safety of PowerShell scripts before they use them. They're gonna be able to compare two scripts and identify some basic poor practices. So step one, they're gonna watch the video above. It's about 25 minutes. I'm suggesting they take notes, but watch the video. Then they're gonna come back and they're gonna download these two scripts here, these two sample scripts to their computer. They're going to save them somewhere. Then they're going to compare and evaluate the scripts. There is an SOP, a fake SOP from the MSP in the text lesson, which we'll go to in a minute. I'm suggesting they read the MSP's SOP, and they are going to, if they feel that they want to, use the iframe function where I have embedded a script viewer to test the scripts. To see what the difference is. And I'll give you some thoughts on that in a minute. They are then going to decide what is the better script between the two. Both scripts do the exact same thing. And they're going to go back to their ticket. And in their ticket, they're going to say which script they chose and why. And they're going to give 3 reasons why they felt that the script they didn't choose was too risky. And then they're going to go and take the quiz to confirm their understanding. And I have it set up this way for a few reasons. I want them to watch a video. I want to remind them of our SOP. I want them to then think critically on their own and compare two things I've put in front of them. I want them to tell me what their rationale was, and then I want them to take the quiz that will let them know if they were right or wrong. That gives me as a manager, if I'm reviewing this later, a lot more to work with. And it's much easier for that employee to correct— connect the dots and start to actually build the neural pathways around why we don't want dangerous scripting practices. So let's say that we've gone and we've watched this video. If I then move over to the lesson text, I have a fake SOP. I got to fix the coloring in here. That was a bad job, Dean. Probably. Yeah, it looks better on light mode here. That is sort of like a fake SOP that might be in your IT Glue or your Hoodoo or whatever. That goes through how we approach examining scripts. I give some things that that MSP has decided are common red flags to look for and what you should do. And you'll notice it says here to ask somebody or to test it first. In that case, there are a couple of helpful resources that have been provided in that SOP for analyzing scripts. And at the end, it says, when in doubt, escalate. Then I have an iframe here that has an online Script Viewer. So let's say the employee's read through all of that, and they decide at this point, okay, I want to examine both of these scripts. I'm going to go ahead, I'm going to open the script file, and I'm going to read through it here. You could of course do this on your local desktop, but there's a little safer than letting somebody who has never run a script open the script locally. And they read through it. And we would have them do that with both of these and try to figure out what they feel The difference is why one is better than the other. When they're done, they would go down and take the quiz after they put notes in their ticket. And the quiz is going to be all the way down here at the bottom. Get started. And then I could— I'm not going to assign it to myself, but, um, go ahead and take this quiz. Quiz is very simple, has 3 questions based on those 2 scripts. Pretty straightforward. Which of the following is the most important reason why script 1 is safer to run than script 2? You see why I had them put notes in the ticket first, because this gives it a away right away what the right answer is. And we will say that script 1 doesn't prompt the user for a password, and that's definitely better. What is the main problem with prompting for admin credentials in script 2? Uh, it, uh, introduces unnecessary risk. And which of the following best describes the difference in error handling between script 1 and script 2? Uh, we'll say script 2 includes logs that make error diagnosis easy. And I'll submit my answers. And in this case, I had specified— and I'll show you in a minute— that I want 100% correct, because I do not want somebody running scripts in an environment that does not understand. So in this case, the right answer here was B, that we document its purpose and uses and error handling, because the whole point here is not specifically or objectively what's wrong with script 2, is why is script 1 safer? This was the correct answer on question 2. And question 3, uh, oh, I actually got it the wrong way around. So in this case, this employee probably shouldn't be running scripts in our environment. So with that, how do we make something like this? If I pop over into the backend, the content admin screen, and open up this lesson that I created, or this course rather, you'll see that I added a lesson and then I added a knowledge check. So if we open that lesson, couple of things, I put the instructions in the description so they'd be presented with those first. I then brought in the video with the YouTube importer, and then I added text down here, put my fake MSP SOP here. If I happen to actually have an instance of Hoodoo or IT Glue, maybe I just link to the SOP. Rather than copying and pasting it here. And then I use the iframe tool here to put in an example script viewer. Now, the tool that I used here is not the best tool to use. A better— if you want to do this on your own, far better to use the Azure shell.azure.com application to do this. I just don't happen to have an Azure subscription handy. Most of you do. That will actually provide a virtual fake terminal for somebody to not only render the script but actually run it. That would be way better in a lab environment. For the purpose of this video, I just wanted to show you the idea of putting something in a website. And then at the very bottom of the lesson, under the downloadables, I have the two scripts that I've uploaded here and the employee can download. It is very straightforward and very simple. And if you've noticed a couple of weird little bits here. There's a couple of random emojis in here. There is some weird highlighting and formatting. Well, that's because I used GPT to help me do this quickly. Yes, I know, vomit. I use GPT, but I had two examples of scripts and I was able to feed that in along with my intended purpose here and what I was trying to design. And GPT put something in front of me that was good enough, at least for this purpose. I mention this because I don't want you all to think when you're working at Empath that everything you do, you have to create completely by hand. It is okay if you have the pieces of what you need and you feed it into another person or a tool like an LLM and ask it to coalesce it into one coherent thought, go back, edit it, and paste it. A smart engineer is a lazy engineer. Who doesn't do extra work that isn't necessary. Just make sure you proofread it. I didn't really proofread it. Be better than me. Make sure you proofread it. That's it. I mean, we are just combining all the things we've talked about before. We are combining basically instructions in the lesson description, importing a video, a text lesson, an iframe, downloadable files, and then We're following that up inside the container of a course with a quiz on DNS script comparison, which is very simple. You say, I only put a couple of questions. I did not go overboard. I'm not looking with this level of training to have an employee go from being a PowerShell scripting level 0 to a level, you know, 5, can write a script for anything. That's not the point. I don't need a Tier 1 tech or even a lot of Tier 2 techs to really be able to do anything advanced, right? I just want to make sure they understand how to not be dangerous when they find something on the internet. And that's a big part of effective learning in Empath. And one of the biggest stumbling blocks that I see a lot of our partners get into— we assume, because it's a training platform, that it's got to be like getting a college degree. We have to teach them everything from now they need to graduate. Absolutely not. We need to make sure that they understand how to use and find information in a way that is safe and will render a good experience for our clients. And in most cases, that is far less complicated. This employee who takes this, if they're into scripting, is going to ask more questions after they take this lesson. They're going to go find someone on the team and say, "That was cool. I want to learn more." They're going to raise their hand. That employee isn't into scripting. They probably won't do that. And eventually when they get to a higher point in their career, do you need them to know more? You do. But the employee who's not engaged is not going to retain everything in this 25-minute video because they don't need to. And the employee who is super engaged is going to want more than this video anyways. So the goal here isn't to try and be everything to everybody. It's the minimum viable amount we need with a lesson and a quiz to ensure that this person understands what good looks like at our MSP, how to behave, and basically how to not be dangerous. And that's it, my friends. If you have any questions or you want help setting something like this up, grab time with me. Be happy to help you. Enjoy Empath. Keep learning.










