News

PowerShell Gets AI-ified in 'AI Shell' Preview

Eschewing the term "Copilot," Microsoft introduced a new AI-powered tool for PowerShell called "AI Shell," available in preview.

"AI Shell create an interactive shell that can interact with various large language model and provides a framework that you can use to build a custom system that meet your needs," the PowerShell team said in a post this week. "Users can interact with the AI agents in a conversational manner."

Initially, two agents are available:

  • Azure OpenAI Agent provides general-purpose assistance using various AI models from Azure OpenAI. It can handle broad queries, interpret natural language, and generate code. For added privacy and control, users can connect the agent to their custom Azure OpenAI models trained on their own data. Alternatively, OpenAI's pre-trained models can also be utilized.
  • Copilot in Azure integrates Copilot into the CLI, offering cloud-focused assistance with Azure CLI and Azure PowerShell commands to automate Azure-specific tasks. To use it, devs need to sign in to Azure CLI with an account that has the necessary IAM role for Copilot access.

CLI functionality is part of the new offering, with other components in addition to the agents being:

  • The command-line shell (aish) interface
  • A framework for creating AI agents and other assistance providers
  • A PowerShell module for deeper integration with PowerShell.

The post details using AI Shell as a standalone executable or in side-by-side integration with PowerShell 7, the latter being the preferred option.

AI Shell with PowerShell 7
[Click on image for larger view.] AI Shell with PowerShell 7 (source: Microsoft).

"The AIShell module connects the aish tool to your PowerShell 7 session for deeply integrated user experience," the team said. "AI Shell opens in a side pane right next to your PowerShell 7 session that enables a rich communication between panes, results from the chat can be carried seamlessly to your PowerShell session for easy execution and the AI agent can be used to provide assistance to resolve a PowerShell error."

To leverage the tool, Windows users need

  • Windows 10 or higher
  • PowerShell 7.4.6 or higher
  • Windows Terminal

and macOS users need

  • macOS v13 Ventura or higher
  • PowerShell 7.4.6 or higher
  • iTerm2 terminal app

The team created created scripts to download and install AI Shell (aish) and the AIShell module, which come in separate downloads, on the two platforms. However, for macOS, the AIShell module is not installed because of some limitations.

"AI Shell was built for those who seek intelligence and adaptability from their command-line," the team said. "With multi-agent support, AI Shell aims to be the assistant for any CLI tool. You'll benefit from advanced AI capabilities, deeper integration with your PowerShell session, and an extensibility model to get the assistance you need."

More information can be found in AI Shell command reference.

As far as eschewing the term "Copilot," the company might be moving in a new direction, with "Windows Intelligence" references seen in new Windows 11 builds. Announcing "AI Shell" instead of "PowerShell Copilot" might be further evidence. Perhaps that's because the company unleashed so many Copilots on the world that the exact number is apparently unknowable, like the value of Pi, beyond the comprehension of humans or machines.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube