I have been scripting the automation of packaging applications and application updates for years. While mostly using PowerShell, some cases I’ve relied on robotic process automation to achieve full coverage of automation. Even when using scripting or robotic process automation, there are instances where I run into challenges.
Automating application packaging, delivery, and updates requires information that can be dynamic in nature, making it difficult to account for when scripting. This is one area of application packaging automation where generative AI (GenAI) can prove beneficial.
How Can GenAI Help IT Teams?
Let’s say you have a naming standard used for all your packages but have difficulty scripting the correct name for your packages, as its impossible to parse and account for the litany of different names and structures used by software vendors. You could feed some of the product information to ChatGPT and get it to return the name in a structure that conforms with your naming standards.
Similarly, if you would like to set a description in the package or in your deployment tool of choice, you could use ChatGPT to generate a concise description for each application without needing to populate it yourself.
Because large language models (LLMs) use data sets with a wide variety of sources and they can use natural language processing to return results more precisely than traditional search engine, their benefits have several applications when it comes to automation processes for enterprise IT.
Adding GenAI to My Automated IT Workflows
Perhaps the best way to teach you about how AI can be used in your automated application packaging and patching is to show you.
When working in enterprise IT, my preferred solution tool for automating application packaging on the corporate network is PowerShell. Luckily, there are several community PowerShell modules you can use for making calls to the OpenAI API, such as PSOpenAI and PSAI.
If you would like to try what I show in this blog post and the video further down the page for yourself, you require the following:
- An OpenAI account with payment details/credit for the API
- A Windows machine with the PSOpenAI PowerShell Module installed
Using ChatGPT to Populate the Command Line in Cloudpaging Containers
Cloudpaging application containers can account for traditional application shortcuts. You can also assign a launch command for the main executable. This is not only useful for application functionality but also when publishing the application in a Storefront.
Getting the path to the main executable isn’t always easy. It may mean going into the vendor supplied MSI with a tool like Master Packager and finding it for yourself or installing the application on a machine and grabbing the path from the shortcut that is installed.
![](https://www.numecent.com/wp-content/uploads/2024/07/AI-GetExecutable.png)
As you can see in the screenshot above, you could just ask a service like ChatGPT to provide the full path for you. Of course, this is useful via ChatGPT in the web but to make use of it in our automated workflows we need to be able to get this data programmatically. This is where PowerShell, the OpenAI API and the PSOpenAI module come in handy. Before we get into how to get and set package parameters programmatically, let’s cover another example.
Setting a Description in a Package and in Cloudpager
![](https://www.numecent.com/wp-content/uploads/2024/07/AI-Description.png)
I could ask ChatGPT to provide a concise description of what a particular application does. I can leverage the API to retrieve this programmatically, store it in a variable and then leverage the Cloudpager PowerShell Module to publish my finished application container with said description populated.
Learn more about the Cloudpager PowerShell Module here >>
Example of Enhancing Automated IT Workflows with GenAI
In the video below, I show you how you can run these queries in PowerShell and store them in variables. This data can then be used when automating the packaging of applications with the Numecent Non-Interactive Packager.
By leveraging ChatGPT to populate this data for me, it saves me time trying to retrieve that information manually myself and reduces the number of parameters I need to pass when running my scripts, making the entire process more reusable.
OpenAI API Queries Come at a Cost
While generative AI has many use cases and can help streamline existing automated workflows, I must ask you to consider where its value lies for you. I could have used ChatGPT to dynamically populate most of the parameters I required for the automated workflow in the above video. However, I only showed it for 2 parameters. This is partly because using it for many queries each time an application update is required can become costly.
OpenAI charges per token with each query costing just a fraction of a cent. A fraction of a cent does not sound too bad, but Enterprises typically have thousands of applications. In present day, some applications get updated every 1-2 weeks which could result in thousands of queries a month in large organizations which may become costly.
Conclusion
While the possibilities AI presents when it comes to automation are vast, much of the mainstream media coverage of generative AI has overhyped the technology. This blog post covers some practical use cases for generative AI in an existing IT workflow. As stated, you must weigh the value of automating IT Workflows with GenAI against the cost.
To hear more about AI for Enterprise IT and my thoughts on it. Check out this video:
Subscribe to the Office of the Technologist
The Office of the Technologist evaluates the latest methodologies, Windows technologies, and industry trends to determine the best approach for delivering and optimizing modern, enterprise-grade IT operations. Fill out the form below to be among the first to hear about the latest content.