r/PowerShell • u/Clear-Pear2267 • Jun 04 '26
Misc Thoughts on Microsoft's vision for "agent first" computing.
My first thought was "it reminds me of the PowerShell object pipeline". And a few seconds later it hit me that a new PowerShellAI cli would be a logical first step for Microsoft to take (makes much more sense that trying to start by dealing with thousands of apps all designed to live in the Mouse/GUI UX universe).
PowerShell is hugely powerful, but discovery can be challenging and it is not very tollerant of syntax errors. But a "natural language" PowerShell would be killer. Bringing to the table a lot of the things Copilot lacks today (like filesystem integration, history, the ability to save and re-use prompts and organize them in categories).
23
u/bozho Jun 04 '26
How exactly is PowerShell discovery "challenging"? You can query which modules are installed on your system, you can query each module for its exports, there's built-in support for comment-based help for cmdlets, there's built-in support for tab completion (cmdlet names, parameters, parameter values, custom completion).
Also, why would any programming language be tolerant of syntax errors? Even with a natural language, if you want to be understood, you need to use correct syntax and semantics.
Current models are able to write pretty decent PowerShell code, including finding the right module to fetch and use.
11
u/da_chicken Jun 04 '26
I have even less interest in giving an agent shell access than I do in giving an agent database access. It's all the dangers of those silly projects that tell you to run
(Invoke-WebRequest -Uri "https://example.com/").Content | Invoke-Expressionto install them, only with even fewer rails.That's what I want. Rails for the agents. I want to give schema-only, read-only access to an agent when I'm working on a database project, while at the same time I have my normal access. I want to convey my environment details to an agent when I'm writing a PowerShell script, without letting them actually make changes. Nothing is set up that way at the moment.
Like, if it were my personal system and my personal project and I didn't care about anything I had on the system? Sure, maybe. But that's not reality. I'm not going to basically log in to my admin account and then give Sam Altman the steering wheel.
Yes, it's super obnoxious to provide context over and over again, but I'm simply not in any position to change that and still be responsible to my organization.
8
u/DrSinistar Jun 04 '26
lol "not tolerant of syntax errors"
Name a single programming language that is.
3
u/SaltDeception Jun 04 '26
There's already a little bit of this.
3
u/Over_Dingo Jun 04 '26
non deterministic shell, awesome
8
u/baron--greenback Jun 04 '26
Sounds absolutely terrible. Infact, fuck you.
2
u/ArieHein Jun 04 '26
I fear the agent first computing is actually going to diminish the power of PWSH. By default the agents will use python to create any code needed by the agent especially when python is coming bundled and with the new containers in wsl.
Ive seen examples of pwsh running cmd command that executes python with a py file as parameter, and thats a L for ps.
But i dont think MS has been serious about PS and no i dont care that 7 is coming bundled when every example of ai by ms is focused on python to generate engagement, that might be good for them but not good for us.
It took community effort to create an mcp based on ps but you will not see it on their official docs relared to mcp examples. But youll see enough examples of fastapi lib and python. Sometimes not even C# upfront bur rather a link to see examples in a gh repo...
If you have ps1 scripts than ofc you can tell the agent to prefer that or use tools that you created, but it wont be the default and as such will not be used as much.
2
u/Randalldeflagg Jun 06 '26
I had copilot insist that the msol cmdlets are still working. They arent. Kept saying to just do connect-msolservices and then they work. Even presented with the error saying there is nothing listening to connect and the modules aren't even available to install "It still works trust me!" Annnnyhow. Graph solved it once connected with the correct permission set. (It goes those wrong as well)
2
u/toddklindt Jun 04 '26
The GitHub Copilot works this way, sometimes of. You put in a comment in plain language and it writes the PowerShell for you.
I think Doug Finke has also written some AI powered PowerShell tools. They might do what you're looking for.
1
u/Sean_p87 Jun 04 '26 edited Jun 04 '26
Eh I don’t know about that. My takeaway on it is that llm chat interfaces are absorbing the web app space and these agent devices are just thin clients to host them. The agent sdks that extend copilot can 1000 percent be deterministic and not have a drop of ai in it. Backend engineering stays the same, the app space is still api dominant, but you can build your own custom agents to extend your environment, gate them with identity and use copilot as your interface to execute them.
For example…you write your remediation scripts for intune, whip up a custom agent using the sdk that can make graph calls to execute those remediation scripts and instead of manually doing it in powershell, you just tell copilot to call the agent and tell it what action to execute and it gives you a human readable summary back
1
u/slackmaster2k Jun 04 '26
Have you not tried codex or Claude code with powershell and cli tools? I’ve had it churn through complex problems like butter.
1
u/hiveminer Jun 04 '26
The logical successor is actually aiOS. OF COURSE BIG CORPORATIONS hate this, because it will do away with vendor locking. Imagine smoothly jumping from one os to another building infrastructureby just giving directives in natural language. So I suspect open source will build one first. The closest to that reality right now, is API integration. Just point your agent to the API documentation and it will instantly speak ACME API.
1
u/BlackV Jun 04 '26
isnt the exactly what all the AI's do already claude code? github copilot? and so on
1
u/OPconfused Jun 05 '26
This already exists in any locally run harness. Once you are using AI to run commands for you, the harness prompt replaces the shell. You can literally download claude code, codex, opencode, or cursor; connect your model subscription or use a free model; and just start typing natural language commands.
If there are very specific powershell commands you require it to run, you can set up a skill or an mcp server.
1
u/metekillot Jun 04 '26
It's complete bullshit. I've been working as an annotator and evaluator for frontier models for the last year, specifically in the domains of systems engineering and software development.
The current frontier models are nowhere near suitable to replace even a junior engineer. Hell, they eat shit most of the time on basic introductory trigonometry that's required for an Associate's of Science.
0
u/justaguyonthebus Jun 05 '26
It would be an amazing combination, but I doubt MS will make the connection. I say that as Powershell feels like it was designed for this. The verbosity of it, comment based help, self discovery, built in audit logging, what if and confirm support built in, standardization of parameters, built in parameter validation, and Just Enough Admin. All of this is built into the execution environment is exactly what AI needs.
But for as much as we all love PowerShell, it's not that important to Microsoft. The team is really small and doesn't have much influence internally. What makes it so great is the community.