Save to My DOJO
I’ve seen a lot of discussions online recently from IT Pros who work for managed service providers who are finding it difficult to use PowerShell in their environment. Let’s be honest, there are many hurdles to overcome in the MSP workspace. You are managing multiple customers and typically they all have their own domains and networks. Each customer environment is its own unique IT ecosystem and most of the time you can’t just do an Invoke-Command from your laptop at your desk to manage them. One of the best ways to help with this is with automation and have a better understanding of what PowerShell is capable of. It’s much easier to automate tasks when you know what you can (and cannot) do with PowerShell. To help you get a little bit of an idea, I’m going to go over 7 PowerShell techniques in this post that you can use to help you supercharge your MSP operations.
This article is a great introduction for newcomers to using PowerShell in an MSP setting but also for current users who may learn a thing or two about optimal applications. Let’s get started!
1. Using SFTP For Transferring Files
This one is HUGE. Being able to transfer files back and forth between a customer location opens up so many doors for automation. There are many situations that can take advantage of this such as pushing installation files to client workstations, but one unique way that I’ve used this on in the past was when troubleshooting network issues. We had a customer that was dropping internet connectivity intermittently every day, they were getting upset at us that it was happening and wanted us to fix it. Their ISP could see that they were overusing their connection, which was causing it to appear like it was cutting in and out. Now the witch hunt started, who was using all the bandwidth?
They didn’t have expensive network equipment that allowed them to audit bandwidth consumption on devices so options were limited. I ended up creating a script that would run for hours at a time and create a log file on the workstations of network traffic on the NIC. It would then upload the log hourly to our SFTP server. We used our RMM agent to deploy this script out to all the customer’s workstations and when they were having bandwidth issues we were able to analyze each workstation’s log files on the SFTP server and determine the culprit. As you can see there are many many situations where SFTP can be used with PowerShell.
2. Encrypting Passwords to Run Scripts
One of the hurdles when creating scripts is securing access for a specific user to run a certain script. Maybe you have a customer that wants their managers to be able to run a specific automated task for HR. The ability to encrypt passwords allows one to create service accounts that can be used in combination with encrypted password files to allow end-users to run their automated tasks in a secure way. Not to mention this is useful for your own scripts as well!
Learn how to encrypt passwords using PowerShell
3. HTML Reports
In my five years of working for an MSP, I’ve run into countless situations where a customer asked for a specific report that our current systems were unable to create. Luckily, Powershell can be used to create custom HTML reports that look professional and can be emailed to out on a schedule. One example I’ve had in the past was a customer was working on a big application rollout and was going to be creating multiple VMs on their Hypervisor cluster. He wanted to have a daily report on the redundancy state of his cluster, meaning if it was able to host all the VM workloads in the event of a host failure. We created an HTML report that would calculate the host resources and provide an email with an HTML table specifying the host resources and whether or not it was “N+1”. The client was very grateful that we were able to accommodate his request.
Learn how to create custom HTML reports using PowerShell
4. Ticketing systems and APIs
Ticketing systems are the bread and butter of an MSP. Being able to automate processes into your ticketing system can produce game-changing efficiency in the company. There are many ticketing systems with PowerShell modules already available out on the Powershell Gallery. These modules can provide the ability to create and search through tickets. Also, using Powershell with restful APIs is another must-have technique that allows PowerShell to interact with other applications and services (Like your ticketing system). This can open so many doors for automation in the MSP workspace and the sky really is the limit with this option. I’ve found it’s simply best to start tinkering with this option and see what it can do for you in your own individual case.
Learn how to use PowerShell to optimize your ticking system
5. Deploying Software
Powershell can be used in combination to quickly deploy software to workstations. This has saved me many hours and trips to customer sites. One time I had a customer call into the helpdesk in a panic because they upgraded their main business software and the current version of java on the workstations was no longer compatible. In a matter of minutes, we were able to use PowerShell and our RMM agent to push out the java upgrade to all the workstations.
6. Windows Updates
There are many useful PowerShell modules out on the PowerShell Gallery, I recommend you take a peek at it if you haven’t already. One of the most useful Modules I’ve found was PSWindowsUpdate. This module allows IT Pros to manage Windows Updates with PowerShell. This can be used as a step to build scripts or just whenever you need it! I can’t count how many times I’ve built a server and had to manually kick off windows updates for a few hours to get the OS up to date. It can also be used to remotely kick off Windows Updates on a large list of workstations across multiple customers, making mass rollout of a zero-day patch, for example, much easier and less time-consuming.
Learn how to manage Windows Updates using PowerShell
The PowerShell Universal Dashboard module is one of the greatest up-and-coming modules in the PowerShell community. This allows one to easily create their own customized dashboards and they look amazing!. For MSPs, this is a great tool that can be used to display and analyze data for not only customers but for internal use as well. I recommend checking this out and playing around with it. Just like the API section listed above, this is one you have to tinker with and see how it can fit into your own MSPs workflow. It will, you just need to figure out exactly what your needs are first.
Learn how to be a pro with the PowerShell Universal Dashboard
Powershell isn’t always going to fit into every solution (though it will come close!), and with the complexity of a Managed Service Provider business, it can be rather difficult at times. However, in knowledgeable hands, it can be used to overcome many challenges in the MSP workspace. Let me know in the comments below about other ways you’ve used PowerShell in your MSP. We’d love to hear about it, and I’m sure our other readers would be grateful for the mind share!
Thanks for reading!
Not a DOJO Member yet?
Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!