February 28th, 2025

Announcing AI Shell Preview 2

Steven Bucher
Product Manager

What’s New in AI Shell Preview 2?

We’re excited to announce the Preview 2 release of AI Shell! With this update you can expect the following improvements:

  • Improved support for Azure PowerShell
  • Broader support for third party OpenAI-compatible models
  • Refactored code sample for creating an Ollama agent
  • Improved native command error handling
  • An easier way to deploy Azure OpenAI instances
  • Additional bug fixes

Improved support for Azure PowerShell

The improvements to the azure agent are designed to reduce friction when managing Azure resources with the Azure CLI and PowerShell. The agent now offers deeper integration with Azure PowerShell, making it easier to use AI-created Azure PowerShell scripts.

  • The /replace command now supports Azure PowerShell. The agent walks you through replacement of parameter values in generated Azure PowerShell responses.
  • The agent now support Azure PowerShell authentication using the Connect-AzAccount command. Previously, the agent only supported Azure CLI authentication.

Broader support for third party OpenAI-compatibles models

With this release, the openai-gpt agent extends support to third party models that follow the OpenAI API specifications, allowing for a more flexible AI experience. Many of these models are open source tools for running SLMs and LLMs locally. The openai-gpt agent nows supports the following additional models:

To use these models, you only need to configure the endpoint, key and model name in the agent config file. The following openai.agents.config file contains example configurations for two of the new AI providers.

{
    "GPTs": [
        {
          "Name": "gpt-deepseek",
          "Description": "A GPT instance using DeepSeek v3.",
          "Endpoint": "https://api.deepseek.com",
          "ModelName": "deepseek-chat",
          "Key": "<your-deepseek-api-key>",
          "SystemPrompt": "You are a helpful assistant."
        },

        {
          "Name": "gpt-gemini",
          "Description": "A GPT instance using Google Gemini.",
          "Endpoint": "https://generativelanguage.googleapis.com/v1beta/openai/",
          "ModelName": "gemini-1.5-flash",
          "Key": "<your-gemini-api-key>",
          "SystemPrompt": "You are a helpful assistant."
        }
    ]

    "Active": "gpt-deepseek"
}

Improved native command error handling

Resolve-Error (alias fixit) now uses the screen scraper API on Windows to capture the error output of native commands. This allows AI Shell to provide better resolution of error messages that come from native commands rather than from PowerShell.

Resolve Error demo

Ollama agent improvements

We refactored the example code for the agent ollama. This example provides the basic structure that you can use to build out your own agent. The refactored code now uses the OllamaSharp library and add the ability to configure the agent using settings files.

The ollama agent isn’t shipped with AI Shell but you can build it yourself. See the instructions in the locally build the repo section of the README. Thank you @kborowinski on GitHub for this contribution!

Tools for easy deployment of Azure OpenAI instances

We added a Bicep template that deploys an Azure OpenAI instance in seconds. Using the template is much faster than manually creating an instance in the Azure portal. This template includes documentation with step by step instructions.

Additional bug fixes

There are many bug fixes in this release. For a complete list of changes, see the changelog.

How to get AI Shell Preview 2

Use the following command to install or upgrade AI Shell:

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

For more information, see Install AI Shell.

Automatically start AI Shell

One piece of feedback we often hear is: How can I have AI Shell automatically start up when I open Windows Terminal?

It’s easy! Just add Start-AIShell to your PowerShell profile script. Here’s how:

  1. Open your profile in the text editor of your choice.
  2. Add the following code to the end of the file:
    if ($PSVersionTable.PSVersion -ge ([version]'7.4.6') -and
      (Get-Process -Id $pid).Parent.Name -eq 'WindowsTerminal') {
       Start-AIShell
    }

Now, AI Shell will automatically start when you open Windows Terminal.

NOTE

AI Shell only works with Windows Terminal and requires PowerShell 7.4.6 or higher.

If you need help creating a profile scripts, see about_Profiles.

Try it out and share your feedback

We would love to hear your feedback as we continue improving AI Shell. Join the discussion in our GitHub Issues and let us know how AI Shell is helping your automation workflows.

Stay tuned for future updates as we bring more AI-powered capabilities to your CLI experience. 🚀

Thanks!

Steven Bucher and Dongbo Wang

AI Shell Team

Author

Steven Bucher
Product Manager

0 comments