November 21, 2024

Microsoft Introduces AI Shell and PowerShell Module for Developers

Listen to this article as Podcast
0:00 / 0:00
Microsoft Introduces AI Shell and PowerShell Module for Developers

AI-Powered Shells: Microsoft's New Tools for Developers

Microsoft is expanding the capabilities of the command line with artificial intelligence and introducing new tools for developers: AI Shell and the associated PowerShell module. These allow interaction with AI agents directly in the terminal and offer support for various tasks, from code generation to troubleshooting.

AI Shell: Two Agents for Different Tasks

AI Shell offers two integrated AI agents: Azure OpenAI and Copilot in Azure. The Azure OpenAI agent can access various AI models from Azure OpenAI and supports queries, natural language processing, and code generation. Developers can connect this agent with their own AI models deployed in Azure to ensure data privacy and control over model settings. The Copilot in Azure agent specializes in cloud-specific tasks. It provides support for Azure CLI and Azure PowerShell commands and helps automate Azure-related processes. Using the Copilot in Azure agent requires signing in to Azure with appropriate permissions.

Integration into PowerShell 7

AI Shell can be used standalone or as a PowerShell module. Microsoft recommends integration into PowerShell 7. In this case, AI Shell opens as a separate window in the terminal alongside the PowerShell session. The results of the AI chat can be transferred directly into the PowerShell session, simplifying the execution of commands and troubleshooting. For errors in the terminal, the command "resolve-error" can be used to send the error message to AI Shell and request support from the AI agent. Switching between the two agents is done via the command "@".

Availability and Installation

AI Shell is available as a Public Preview for Windows, macOS, and Linux. Installation scripts exist for Windows and macOS, while manual installation is required on Linux. The AI Shell module is currently not supported on Linux. System requirements vary depending on the operating system. Windows users require at least Windows 10, PowerShell 7.4.6, and Windows Terminal. macOS requires macOS 13 Ventura, PowerShell 7.4.6, and iTerm2 (limited support). Linux users need Ubuntu 20.04 or higher, PowerShell 7.4 or higher (recommended), and a terminal emulator.

Outlook and Feedback

AI Shell is still under development, and Microsoft encourages developers to provide feedback. Known issues include limited support on Linux and macOS, as well as minor incompatibilities with various Windows Terminal versions. Microsoft plans to continuously develop AI Shell and expand its functionality. Bibliography: - Heise: AI on the command line - Microsoft releases AI Shell - Microsoft Learn: AI Shell Overview - Microsoft Learn: AI Shell Architecture - Microsoft Learn: AI Shell PowerShell - Microsoft Learn: AI Shell Installation - Microsoft Learn: AI Shell Reference - Golem: ChatGPT in the console - The Windows Terminal now has an AI chatbot - Microsoft Learn: AI Shell Standalone - finanzen.at: FRO Invitation to Q3 2024 Results Conference Call and Webcast - Microsoft News: Microsoft introduces new customized AI models for industry