My (unsuccessful) struggle with the Windows PowerShell
Admin Klaus
For my small apps I licensed a VPS from hostinger. Nice thing, I can run many node.js programs. The only problem: the thing runs on ubuntu, and my Unix admin days are 30 years in the past. I can still read and understand most Unix commands quite well, but I have neither the time nor the desire to relearn the details and bring myself up to date regarding things like UFW or PM2.
So I needed “Admin Klaus” – an ssh shell that you talk to in natural language, which then has an LLM create a plan for which Unix commands are needed to fulfill my request, and then executes that plan. In reference to the classic “Gabelstaplerfahrer Klaus” YouTube video, which starts as a safety training for driving forklifts and ends as a splatter fest, my LLM Unix admin shell had to be called Klaus. Even though I was careful and Klaus always shows me the command to be executed for confirmation and then executes exactly that command.
And PowerShell Fritz
This works so well that I enthusiastically wanted the same thing to manage my home PC. Unlike UNIX commands, PowerShell means very little to me. So I wrote a small specification for what a natural-language interface on top of PowerShell should be able to do, and Cursor + Claude Opus 4.5 got started and built it for me. And just like Klaus, the shell almost worked right away.
And failed miserably at almost everything. My two use cases were:
-
Go into a sibling directory and give me the number of lines of JavaScript + HTML code, recursively in subdirectories, ignoring the common dependency directories (like node_modules).
-
In a particular image, replace the capture date in the EXIF with another one.
And this is how it went:
Task 1 works by chance sometimes, sometimes not. Sometimes the shell tells me “0 lines!”, sometimes it tells me “140000 lines”. The correct value would be around 3000. The app always produces the most beautifully incomprehensible PowerShell scripts, executes them, and returns an incorrect result.
Task 2 never succeeds at all despite the app’s enthusiastic success message. The app always claims “everything executed, works.” And the EXIF date stubbornly stays as it is.
I then tried all sorts of things: optionally using PowerShell 7, using GIMP (GIMP scripts from the AI NEVER work), no GIMP, using EXIF-Tool. None of it helped.
And PowerShell Fred
So: realizing that it really takes millions of lines of code to train an LLM well, and that those lines are available for Python and Unix scripting, but not for PowerShell.
PowerShell Fred now executes PowerShell commands directly for simple things like “cd”. If it wants something more complex, the AI writes a Python script (and knows some common libraries like Pillow, piexif, openpyxl). Again, of course, with “User has to approve execution of the script”.
And voilà! Fred solves both tasks right away.
The moral of the story
I could, of course, have checked whether OpenAI or Google trained their LLMs better for PowerShell, but why bother. In general, it does make you wonder what future such shell scripting still has today, when for small things like “rename all JPGs in this folder so that the capture date is the name” or “create an Excel file with all files in this folder + size” or … you can have a script written for you with almost no effort.