Microsoft AI Shell: The Next Evolution of the Admin Command Line

AI Shell is an interactive shell that provides an AI chat interface with language models.

Programming-code

Microsoft AI Shell brings an AI‑assisted, conversational experience to your terminal. It runs as a standalone CLI (aish) or as a sidecar in Windows Terminal/PowerShell/iTerm2 (macOS), where it can suggest commands, fix errors, and even insert code directly into your shell.

It ships with AI agents for Azure OpenAI (GPT‑4o) and Copilot in Azure, with great integration for PowerShell and Azure admin workflows. It’s currently in preview, with active development and new capabilities like running commands in the terminal and MCP (Model Context Protocol) server support.

Why AI is coming to the Command Line

Have you ever needed to look up some syntax for an Azure command like New-AzResourceGroup, tried to remember an obscure PowerShell switch, or copy‑pasted a one‑liner from a forum, and thought ‘What does this do?” This is where AI Shell saves the day.

AI Shell aims to remove that friction by putting an AI copilot next to your prompt, so you can ask for the command you meant to type, get a fix for an error, or make changes to a script without leaving the terminal. In the sidecar view, it can even insert the generated code directly into your active shell for quick execution and testing.

What is Microsoft AI Shell?

AI Shell is an interactive, AI‑assisted command‑line environment developed by Microsoft. Seeing this as “chat meets CLI” in your head will help you understand. It includes pluggable agents that connect to AI models and assistance providers. Out of the box, you get:

  • Azure OpenAI agent (GPT‑4o), which serves for general AI tasks, prompts, and code generation.
  • Copilot in Azure agent, providing Azure‑aware assistance for Azure CLI and Azure PowerShell tasks.

Can be used as a standalone CLI or an integrated sidecar with PowerShell

You can run AI Shell as:

  • Standalone: the aish executable.
  • Sidecar: integrated pane in Windows Terminal (or iTerm2 on macOS) that augments PowerShell 7 with predictive IntelliSense, code‑insertion, and multi‑step command handling.

The project is open on GitHub (formerly “Project Mercury”) and is evolving quickly.

Key AI Shell features for IT Pros

Here are some of the core capabilities IT Pros will care most about.

Examples of AI-driven commands

Ask AI Shell to write or revise PowerShell/Azure CLI commands:

  • “Create an Azure CLI command to deploy a resource group in eastus.”
  • “Generate a PowerShell snippet to list the top 10 processes by CPU.”
    AI Shell returns a ready‑to‑run command and (in sidecar) can insert it into your shell.

Integrated sidecar experience

Launching via the PowerShell module gives a split‑pane experience. Here are some examples of what you can do:

  • Paste or insert generated code directly into your prompt.
  • Use Predictive IntelliSense to accept multi‑step suggestions quickly.
  • Get simple error recovery commands suggested after a failure.

Terminal command execution (Preview)

Recent previews add built‑in tools like run_command_in_terminal, allowing the AI to execute a command and test/iterate based on the output, which is powerful for diagnostics and guided remediation.

Real-world scenarios for IT Pros

Let me offer some helpful and common real-world scenarios that IT Pros should find immediately helpful.

Azure Resource prompts with Azure CLI

Prompt: “Create an Azure CLI command to deploy a resource group named rg-aiops in eastus.”
Result (typical):

az group create --name rg-aiops --location eastus

Troubleshoot errors with AI-powered remediation suggestions

When a command fails, paste the error into the sidecar and ask for remediation. In recent previews, the agent can also re‑run a corrected command and iterate based on the new output.

How to install Microsoft AI Shell

As this feature environment is in preview, we’re still learning about installing and setting it up. But the ideal fundamental posture is to use Windows, PowerShell 7, and Windows Terminal.

Install AI Shell using a PowerShell 7 script

Using PowerShell 7, run the following command:

winget install Windows.PowerShell

You can run this single command to install all the necessary tools to create the environment on your computer.

Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-aishell.ps1') }"

To start, type:

Start-AIShell
Microsoft AI Shell - The 'sidecar' experience after running 'Start-AIShell'
Microsoft AI Shell – The ‘sidecar’ experience after running ‘Start-AIShell’ – Image Credit: Michael Reinders/Petri.com

Platform support

Windows 10 and Windows 11 with PowerShell 7.4.6 or higher are required. Windows Terminal is an ideal choice for a shell. PSReadLine v2.4.2-beta2 or higher is also needed, but this will get installed for you during the main installation script.

You can also utilize iTerm2 on macOS. You’ll need:

  • macOS v13 Ventura or higher
  • PowerShell 7.4.6 or higher
  • Default macOS Terminal app for the standalone experience
  • iTerm2 required to use the sidecar experience
    • Python 3.11 or higher is required to support iTerm2
    • Must enable Python APIs in the iTerm2 settings
  • PSReadLine v2.4.2-beta2 or higher

Limitations and known issues

  • Preview status: remember, this has not hit ‘General Availability’, so you may discover issues or buggy behavior. Microsoft is iterating changes on a pretty routine basis. For better or worse…
  • Sidecar support: officially Windows Terminal & iTerm2; Linux lacks the same split‑pane experience.
  • Multiple Terminal versions: with both Preview and Stable Windows Terminal, elevation and window selection quirks can occur.

As an example, here are the technical release notes for the prior version (at time of writing), 1.0.0-preview 7 from September of 2025:

  • Move to Azure.Identity v1.14.2 and refactor the telemetry library (#404)
  • Use login shell on macOS to start aish in sidecar pane to inherit proper PATH (#403)
  • Properly escape tool description to avoid malformed Markup object (#408)
  • Add gpt-5 models to the supported model list (#409)
  • Update the history file name and exclude the environment and managed-identity credentials from Azure authentication flow (#412)
  • Keep the original casing of model name for custom endpoint to enable Foundry Local (#413)

AI Shell is in line with Microsoft’s future of AI administration

AI Shell complements Microsoft’s broader Copilot strategy by bringing AI directly to the place admins spend their day: the terminal. For IT Pros and network admins, that means:

  • Faster task completions and more efficient flow, staying within one console.
  • Fewer syntax dead‑ends and quicker error recovery.
  • Easier onboarding for newer IT Pros on your staff via a well-guided command generation.
  • A path toward agentic workflows that can run, observe, and adapt in the CLI.

Frequently asked questions

What is Microsoft AI Shell?

Microsoft AI Shell is an interactive, AI‑powered command‑line experience that integrates directly with PowerShell, Windows Terminal, and iTerm2. It uses AI “agents” like Azure OpenAI and Copilot in Azure to help users find commands, fix errors, and understand output more easily. The tool enhances productivity by adding conversational, AI‑assisted workflows to the CLI.

How do you install Microsoft AI Shell?

AI Shell can be installed on Windows by running Microsoft’s installation script in PowerShell:
Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-aishell.ps1') }".
Once installed, it becomes available as the aish CLI and can also integrate with the PowerShell module for side‑by‑side use in Windows Terminal.

What can you do with AI Shell?

AI Shell lets you ask natural‑language questions that it translates into CLI operations, helping with tasks like generating PowerShell commands, debugging errors, or performing Azure operations. With its agents, it can explain commands, craft scripts, summarize errors, and assist with Azure CLI or Azure PowerShell tasks. This makes complex CLI operations more intuitive and accessible.

Which AI models or agents does Microsoft AI Shell support?

AI Shell currently supports the Azure OpenAI agent, which connects to GPT‑4o, and the Copilot in Azure agent, which specializes in Azure‑specific tooling and guidance. Its architecture also allows users to create or add custom agents. Support varies by preview version, and new capabilities continue to be added as the tool evolves.