Automating with Jenkins and PowerShell on Windows
Take a minute think about how many PowerShell scripts you have written for yourself or your team. Countless functions and modules, helping to automate this or fix that or make your teams lives easier. You spend hours coding, writing in-line help, testing, packaging your script, distributing it to your team. All that effort, and then a lot of the time the script is forgotten about! People just go back to doing things the manual way.
I put this down to being out of sight, out of mind. Users who do not use the command line regularly will quickly forget about the amazing PowerShell-ing that you did to try and make their lives easier.
Then there are are other problems, like working out the best way to give end users permissions to use your function when they aren’t administrators. Do you give them remote desktop access to a server and only provide a PowerShell session? Setup PowerShell Web Access? Configure a restricted endpoint? I thought the point of this module was to make your life easier, not make things harder!
These problems are what an open source tool called Jenkins can solve for you. Traditionally used by developers to automate their build process, it can be leveraged to wrap web interfaces, job tracking and scheduling around the PowerShell scripts you worked so hard on.
The below image shows what a Jenkins build looks like. In this basic example, the the build creates a text file on a remote machine by using PowerShell Remoting and the Set-Content CmdLet**. **The parameters for these commands can be entered into the form, and will be passed to your PowerShell script via variables.
To find out how to start leveraging Jenkins in your environment, take a look at the below blog posts:
Related Articles
Media Sync: Organize Your Photos and Videos with PowerShell
Do you have photos and videos that you have taken over the years that are scattered all over the place? Do you want to have all your photos and videos organized? Do you want all your photos and videos to have a standardized naming scheme? If you answered YES to these questions, then this is the post for you. In this post, I will provide you with the PowerShell code and examples for how to use the Media Sync script.
NetNeighbor Watch: The PowerShell Alternative To Arpwatch
In this post, we are going to setup NetNeighbor Watch on a Raspberry Pi. NetNeighbor Watch can keep an eye on your network and send you an email when a new host is discovered. NetNeighbor Watch is done completely in PowerShell. The results are very similar to those of arpwatch. NetNeighbor Watch is for anyone that wants more visibility into the wireless or wired devices on their network. We will also setup a weekly email report with all of the known hosts on your network.
Simple PowerShell GUI
Over the years, I have supported and created multiple types of GUIs. I finally decided a few years ago to create a very simple menu driven PowerShell GUI. I wanted something that was very powerful yet very simple to maintain. I really enjoy automating manual administrative tasks, so that is what drove this project in the first place. Before I created the menu driven PowerShell GUI, I had directories and directories of very specific scripts to do specific tasks.