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

Subscribe on YouTube