Typos or module not installed? Azure PowerShell now provides in tool assistance
Starting with Az v8.2.0 we are providing suggestions when PowerShell cannot find a command, as shown in the animated GIF. We not only detect typos, but also many other use cases such as when the required module is not installed.
Azure PowerShell gives a suggestion against a typo in the command name.
Use cases
Typo
For typos, Azure PowerShell tries to find commands that are similar to the input. If any are found, the candidates will be displayed as recommendations.
To do this, we maintain a static table of mappings from all the commands to modules. The table ships with each release of Az.Accounts module. Because of this, no network requests are involved in the recommendation process. The file to store the mappings takes around 300 KB of disk space after installation. But the size of the package is increased by merely 60 KB.
Module not Installed or Outdated
One of the biggest reason a command cannot be found is that the corresponding module is not installed. It could be the module is in preview, so it is not included in the Az rollup module. Or the modules were installed separately rather than via the rollup module.
A similar case is that an older version of the module is installed but the command is introduced in a newer version.
In both cases, Azure PowerShell tries to figure out which Az module needs to be installed or updated. Suggestions are displayed accordingly.
Azure PowerShell suggests user to install the module when a command is not recognized.
Command Deprecation
Breaking changes are sometimes inevitable. To reduce the effort of upgrading, Azure PowerShell displays warning messages for the upcoming breaking changes. We also created migration guides for each major release. Now, leveraging this feature, we have added real-time inline suggestions for deprecated commands.
In such case, Azure PowerShell displays a message to explain the reason and guide user to the migration documents.
Azure PowerShell warns about deprecated commands.
Note that the message is only for commands that have been deprecated. There is another system to preannounce upcoming breaking changes, and that will not be affected.
Advantages
- Quick response. In our test, the worst-case end-to-end time is no longer than 150 milliseconds. The latency introduced by intelligent recommendation was not noticeable.
- Compatibility. Both PowerShell 7 and Windows PowerShell are supported.
Limitations
- The intelligent recommendation system is triggered only when the command matches Azure PowerShell pattern (“*-Az*”) due to performance considerations.
- To enable the feature, the Az.Accounts module needs to be imported.
Feedback
This feature is already available. Feel free to share your experience in the comments below or GitHub discussions. We welcome your feedbacks!
Published on:
Learn moreRelated posts
Fabric Mirroring for Azure Cosmos DB: Public Preview Refresh Now Live with New Features
We’re thrilled to announce the latest refresh of Fabric Mirroring for Azure Cosmos DB, now available with several powerful new features that e...
Power Platform – Use Azure Key Vault secrets with environment variables
We are announcing the ability to use Azure Key Vault secrets with environment variables in Power Platform. This feature will reach general ava...
Validating Azure Key Vault Access Securely in Fabric Notebooks
Working with sensitive data in Microsoft Fabric requires careful handling of secrets, especially when collaborating externally. In a recent cu...
Azure Developer CLI (azd) – May 2025
This post announces the May release of the Azure Developer CLI (`azd`). The post Azure Developer CLI (azd) – May 2025 appeared first on ...
Azure Cosmos DB with DiskANN Part 4: Stable Vector Search Recall with Streaming Data
Vector Search with Azure Cosmos DB In Part 1 and Part 2 of this series, we explored vector search with Azure Cosmos DB and best practices for...
General Availability for Data API in vCore-based Azure Cosmos DB for MongoDB
Title: General Availability for Data API in vCore-based Azure Cosmos DB for MongoDB We’re excited to announce the general availability of the ...
Efficiently and Elegantly Modeling Embeddings in Azure SQL and SQL Server
Storing and querying text embeddings in a database it might seem challenging, but with the right schema design, it’s not only possible, ...