Install and use Microsoft AI Shell
Explore Microsoft AI Shell — an interactive command-line tool that brings Copilot in Azure and GPT-4o to your terminal. Learn how to install it and get started with AI-powered CLI commands.

The command-line interface (CLI) remains a key tool for IT operations and development workflows, sometimes it’s friendly, other times it’s syntax-heavy and frustrating.
That’s where Microsoft’s new AI-powered shell tool can help - it’s called AI Shell.
What is AI Shell?
AI Shell is an interactive command-line experience that combines a chat interface with language models. It integrates directly into Windows Terminal and iTerm2 on macOS, offering an AI-assisted way to work with CLI tools.
AI Shell provides agents that connect to different AI models. In its initial release, AI Shell includes two: Azure OpenAI agent – connects to an instance of GPT-4o and handles general AI tasks. Copilot in Azure agent – assists specifically with Microsoft Azure questions and tasks.
The Azure OpenAI agent connects to an instance of gpt-4o and is the agent for general AI tasks. While the Copilot in Azure agent can assist with Microsoft Azure knowledge.
Launched in 2025, AI Shell is currently in version v1.0.0-preview.6. As with many preview tools, some features may be unfinished or prone to issues, and functionality is subject to change.
Install AI Shell
To use AI Shell, you'll need to install both the CLI tool (aish) and the AI Shell PowerShell module.
On Windows, run the following script:
Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-aishell.ps1') }"
For macOS or Linux, refer to the official documentation for platform-specific installation instructions.
Get started with AI Shell
Once installed, you can start AI Shell by launching your terminal and running: Start-AIShell
You’ll be prompted to select an AI agent. Let’s choose the Copilot in Azure agent for this example.
First of all make sure you are logged in to Azure via your shell, you can do this using the az login or Connect-AzAccount command, as Copilot in Azure will need to be able to login to your Azure environment to work correctly and answer your questions.
Once you are logged in, select the “Azure” agent from the list.
The agent should go through the log in process and you can start to interact with it.
Using the AI Shell
You can now ask questions like:
"Create an Azure CLI command to deploy a resource group."
The agent will respond with the exact CLI command to run.
To use the Azure OpenAI agent, you’ll need to connect it to either: an Azure OpenAI resource you’ve deployed, or a valid OpenAI API account. Both are paid services.
To configure this connection, create a JSON file with the relevant keys and endpoint information. Full details are available in the official documentation.

Conclusion
The Microsoft AI Shell brings AI directly into your CLI, helping with common tasks and making using CLI more accessible. Whether you are managing Azure resources or exploring AI-powered command creation this preview tool is worth trying out, but keep in mind it is still evolving.