Let me set the stage… previously we had a batch file in our startup script to add/remove network drives. It worked great and didn’t have any issues. We moved away from an on-site file server to a cloud solution with local cache. They created a new batch file for us which worked perfectly… until we started looking at integrating Intune computers. Luckily, early on we caught this, and realized we needed a PowerShell script instead of a batch script. We reached out to the vendor with knowing they had PowerShell experience and asked if they could recreate the script using PowerShell. They came back with a quote of $1,500.
I looked at the batch script again, and said there is no way it costs that much to convert an already working batch script to PowerShell. So what did I do? I opened up the 26 line batch script, skimmed over it, then copied it into ChatGPT, and told it to convert the script to PowerShell. It created a PowerShell function within the script and when I followed up with an additional prompt to see if a certain drive was still present to delete it, it created that as well. It was 98% done, I only had to fill in our company data and one part they had an additional parameter that wasn’t needed. All less than 15 minutes. For context, this was with ChatGPT with GPT-4 back in early May 2023, as it is even better now.
Is ChatGPT always this accurate? No, but when you search on Google, Stack Overflow, or any other site, is it always accurate? I like to think of ChatGPT, Azure OpenAI, etc as a smart intern where you trust, but verify the work before implementing. Always test in a development environment as some code take down infrastructure(Same with other sites/LLMs)
Now, not only did I save the company $1,500, I saved time from all the meetings, paperwork(Purchase Order and misc), and testing with the vendor which I used to work on other projects!
Hope you found this helpful and gets you thinking of using ChatGPT, Azure OpenAI, etc more, but please make sure you know what you are testing and/or are in a complete test environment. And if for some reason you take down something in production by accident, let someone know asap what you were doing, so that it can be quickly resolved if you aren’t sure how to fix it.
[…] https://clatent.com/2023/09/how-chatgpt-saved-our-company-1500-in-less-than-15-minutes/ […]