{"id":20814,"date":"2025-05-21T07:16:13","date_gmt":"2025-05-21T15:16:13","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/powershell\/?p=20814"},"modified":"2025-05-21T07:21:09","modified_gmt":"2025-05-21T15:21:09","slug":"preview-4-ai-shell","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/preview-4-ai-shell\/","title":{"rendered":"AI Shell Preview 4 Release!"},"content":{"rendered":"<p><!-- markdownlint-disable MD041 --><\/p>\n<h1>AI Shell Preview 4 Is here: Better macOS support, and more!<\/h1>\n<p>We&#8217;re excited to share the latest preview release of AI Shell that includes new features and\nimprovements based on your feedback. This release focuses on improving the user experience by\nimproving access to Azure OpenAI deployments, improvements to the <code>Invoke-AIShell<\/code> command, and\nexpanded compatibility with macOS.<\/p>\n<h2>MacOS support improvements<\/h2>\n<p>We&#8217;ve made significant improvements to the macOS side car experience with iTerm2. Previously, the\nside car experience was unreliable and didn&#8217;t support the <code>\/code post<\/code> command. Now you have a more\nreliable experience with feature parity with your experience on Windows. For this experience you\nneed to run PowerShell 7 in iTerm2. For more information about PowerShell 7 on macOS, see\n<a href=\"https:\/\/learn.microsoft.com\/powershell\/scripting\/install\/installing-powershell-on-macos\">Installing PowerShell on macOS<\/a>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2025\/05\/macdemo.gif\" alt=\"AI Shell Preview 4 on mac\" \/><\/p>\n<h2>Support for Microsoft Entra ID<\/h2>\n<p>To keep password and keys secure, we&#8217;ve added support for Entra ID authentication to to Azure OpenAI\ninstances. Now you can access your Azure OpenAI resource without storing keys in the configuration\nfile. The following example shows how to configure Entra ID authentication:<\/p>\n<pre><code class=\"language-jsonc\">{\r\n  \/\/ Declare GPT instances.\r\n  \"GPTs\": [\r\n      \/\/ Declaration of an Azure OpenAI instance with EntraID authentication\r\n      {\r\n        \"Name\": \"ps-az-entraId\",\r\n        \"Description\": \"A GPT instance with expertise in PowerShell scripting using Entra ID authentication.\",\r\n        \"Endpoint\": \"&lt;Your Endpoint&gt;\",\r\n        \"Deployment\": \"&lt;Your Deployment Name&gt;\",\r\n        \"ModelName\": \"&lt;Your Model Name&gt;\",\r\n        \"AuthType\": \"EntraID\",\r\n        \"SystemPrompt\": \"You are a helpful and friendly assistant with expertise in PowerShell scripting and command line.\"\r\n      }\r\n  ],\r\n\r\n  \/\/ Specify the default GPT instance to use for user query.\r\n  \"Active\": \"ps-az-entraId\"\r\n}<\/code><\/pre>\n<p>This is the hierarchy of credentials that AI Shell will use to authenticate to Azure OpenAI:<\/p>\n<ul>\n<li><code>EnvironmentCredential<\/code><\/li>\n<li><code>WorkloadIdentityCredential<\/code><\/li>\n<li><code>ManagedIdentityCredential<\/code><\/li>\n<li><code>SharedTokenCacheCredential<\/code><\/li>\n<li><code>VisualStudioCredential<\/code><\/li>\n<li><code>AzureCliCredential<\/code><\/li>\n<li><code>AzurePowerShellCredential<\/code><\/li>\n<li><code>AzureDeveloperCliCredential<\/code><\/li>\n<li><code>InteractiveBrowserCredential<\/code><\/li>\n<\/ul>\n<p>For more information on what these particular credentials are, please see the\n<a href=\"https:\/\/learn.microsoft.com\/dotnet\/api\/azure.identity.defaultazurecredential\">DefaultAzureCredential<\/a> reference.<\/p>\n<h2>Invoke-AIShell command additions<\/h2>\n<p>We&#8217;ve added additional parameters to the <code>Invoke-AIShell<\/code> command to allow for easier use of the\nside pane without leaving the left side of the screen.<\/p>\n<ul>\n<li><code>-PostCode<\/code> &#8211; This parameter allows you to post code generated from the side pane to the connected\nPowerShell session. It reduces the need to switch between the side pane and terminal to run the\n<code>\/code post<\/code> command.<\/li>\n<li><code>-CopyCode<\/code> &#8211; This parameter allows you to copy code from the side pane without using the\n<code>\/code copy<\/code> command.<\/li>\n<li><code>-Exit<\/code> &#8211; This parameter allows you to exit the side pane without using the <code>\/exit<\/code>\ncommand.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2025\/05\/InvokeAIShellDemo.gif\" alt=\"Video of Invoke-AIShell Demo.\" \/><\/p>\n<p>These new parameters allow you to use your terminal normally. You can inject AI generated commands\nwithout cluttering your main buffer and keep all the details and descriptions in the side pane. This\nis a great way to use AI Shell as side by side shell assistant! Coupled with PSReadLine Predictive\nIntelliSense, you can quickly and easily use AI Shell in your normal shell workflow.<\/p>\n<h2>Phi Silica agent<\/h2>\n<p>We&#8217;ve added a new experimental agent called <strong>Phi Silica<\/strong>. This agent uses the built-in Phi Silica\nmodel included with the latest Copilot+ PCs, allowing you to have an offline experience with AI\nShell.<\/p>\n<p><div class=\"alert alert-primary\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Info\"><\/i><strong>Note<\/strong><\/p>This agent isn&#8217;t shipped with the default installation of AI\nShell. To use this agent, you need to clone the repo and build the code. Follow the instructions at\n<a href=\"https:\/\/github.com\/PowerShell\/AIShell?tab=readme-ov-file#locally-building-ai-shell\">\nLocally Building AI Shell<\/a>.<\/div><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2025\/05\/PhiSilicaAgentDemo.gif\" alt=\"Phi Silica Agent\" \/><\/p>\n<p>This experimental AI provider is a proof of concept that&#8217;s still under development. You should only\nuse it for testing. Expect breaking changes in future releases.<\/p>\n<h2>Additional minor improvements<\/h2>\n<p>Here are a few additional improvements that have been made in this release:<\/p>\n<ul>\n<li>Updated model information to support latest OpenAI models (<a href=\"https:\/\/github.com\/PowerShell\/AIShell\/pull\/368\">#368<\/a>)<\/li>\n<li>Add \/clear as an alias to the command \/cls to clear console in AIShell (<a href=\"https:\/\/github.com\/PowerShell\/AIShell\/pull\/370\">#370<\/a>)<\/li>\n<li>Update installation script to install the AIShell module on macOS too (<a href=\"https:\/\/github.com\/PowerShell\/AIShell\/pull\/374\">#374<\/a>)<\/li>\n<li>Enhanced model management and system prompt integration in OllamaAgent (<a href=\"https:\/\/github.com\/PowerShell\/AIShell\/pull\/351\">#351<\/a>) (Thanks\n<a href=\"https:\/\/github.com\/cnupy\">@cnupy!<\/a>)<\/li>\n<\/ul>\n<p>To see the full list of changes, check out the changelog in the <a href=\"https:\/\/github.com\/PowerShell\/AIShell\/releases\/tag\/v1.0.0-preview.4\">release page<\/a>.<\/p>\n<h2>How to install AI Shell Preview 4<\/h2>\n<p>To install the latest version of AI Shell, run the following command in your PowerShell terminal:<\/p>\n<pre><code class=\"language-powershell\">Invoke-Expression \"&amp; { $(Invoke-RestMethod 'https:\/\/aka.ms\/install-aishell.ps1') }\"<\/code><\/pre>\n<p>As usual we would love for you to try AI Shell and provide feedback in our <a href=\"https:\/\/github.com\/PowerShell\/AIShell\/issues\">GitHub repository<\/a>.<\/p>\n<p>Thanks so much!<\/p>\n<p>AI Shell Team<\/p>\n<p>Steven Bucher &amp; Dongbo Wang<\/p>\n<p><!-- updated link references --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re excited to share the latest preview release of AI Shell that includes new features and improvements based on your feedback.<\/p>\n","protected":false},"author":98569,"featured_media":20640,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[3196,3193,3195,3194],"class_list":["post-20814","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-ai","tag-ai-shell","tag-azure-openai","tag-copilot-in-azure"],"acf":[],"blog_post_summary":"<p>We&#8217;re excited to share the latest preview release of AI Shell that includes new features and improvements based on your feedback.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/20814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/98569"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=20814"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/20814\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/20640"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=20814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=20814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=20814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}