Continuing on with our PowerShell stories series next up we have a story from Josh Duffney about automating System Center Orchestrator!
Be careful, when automating development work.
I immediately realized that one person running System Center Configuration Manager wasn't going to work for an enterprise of 16,000 Full time staff, over 25,000 devices and 1000+ applications. Since asking for more bodies wasn't an option, I looked towards automation. My experience with Windows PowerShell was limited at this point, but I saw this as an opportunity to learn.
After watching many Pluralsight courses on the matter and reading two books; Learn PowerShell 3 in a Month of Lunches and Learn PowerShell Toolmaking in a Month of Lunches, I felt ready to attempt this task. I started by breaking down the task in to sections; write silent installer, create configuration manager application, distribute, test deployment, configure detection method etc. In the beginning each of these were a PowerShell script, I'd execute manually. It worked great for me, but I quickly became a bottle neck or constraint.
I had the bright idea of putting all my PowerShell scripts into a runbook that could be executed from System Center Orchestrator. (If anyone has done this, they know it's painful) After about 20 hours I had it somewhat working, minus the double hop issues. A problem occurred to me when I was developing a front end to the runbook. There is no way I could present a user with the necessary fields without there being 30+ boxes to fill out and who would use that? On top of that every application is different and how could I account for things I hadn't even run into yet.
The lesson I learned here was to automate the routine work only and leave the pure development work to the humans. I ended up still using most of my code and automation, except for the part that automates the installer script. I trained several people at the service desk on the process I had created and empowered them to start writing the installer code and use the automation to test and deploy in production.
Join the Jar Tippers on Patreon
It takes a lot of time to write detailed blog posts like this one. In a single-income family, this blog is one way I depend on to keep the lights on. I'd be eternally grateful if you could become a Patreon patron today!Become a Patron!
Subscribe to Adam the Automator
Get the latest posts delivered right to your inbox