Loading...

Announcing Az Predictor preview 5

Announcing Az Predictor preview 5

[November 2021: Updated version of PowerShell and PowerShellGet]

Last November, we announced the first preview of Az Predictor, a PowerShell module for Azure that brings to your fingertips the entire knowledge of the Azure documentation customized to your current session.
Today we are announcing a new preview and we want to share some clarity on our plans for the next few months.

 

AzPredictor-preview2-dynamichelp.png

 

 

What did we learn from the first preview?

Since the release of the first preview, we listened to customer feedback and identified some challenges.

  1. Customers believed that the predictor was not functional. Since the service that is used to deliver the predictions did not support outages, we believe this feedback is caused by the following reasons:
    1. The module had to be imported manually and several customers either forgot or did not know that they had to import the module.
    2. The default configuration of PSReadline had to be changed to show the predications from Az Predictor.
  2. With an accepted suggestion, the navigation through the parameter values can be complicated especially when the list of parameters is long.
  3. We were not making any suggestions for several modules (for example Az.MySql).

 

What has changed?

The module now exposes two cmdlets ‘Enable-AzPredictor’ and ‘Disable-AzPredictor’ to automatically import the module and configure PSReadline. The cmdlet also allows users to enable the settings for future sessions by updating the user’s PowerShell profile (Microsoft.PowerShell_profile.ps1).

Az.Tools.Predictor required API changes to the PowerShell engine to improve suggestions (requiring PowerShell 7.2 preview 3 or later).

You can now use dynamic completers to easily navigate through the parameter value with the ‘Alt+A’ combination.

We are continuously improving the model that is serving the predictions displayed on your screen. This is the most important and invisible piece of software that makes the magic! The most recent update of the model now comprises the missing modules.

 

Getting started with preview 5

If you have installed the first preview:

  • Close all your PowerShell sessions
  • Remove the Az.Tools.Predictor module

To install the second preview of Az.Tools.Predictor follow these steps:

  1. Install PowerShell 7.2-RC1
    Go to: https://github.com/PowerShell/PowerShell/releases/tag/v7.2.0-rc.1 
    Select the binary that corresponds to your platform in the assets list.

  2. Launch PowerShell 7.2-RC1 and Install PSReadline 2.2 beta 4 with the following:
    Install-Module -Name PSReadLine -AllowPrerelease
    More details about PSReadline: https://www.powershellgallery.com/packages/PSReadLine/2.2.0-beta4 

  3. Install Az.Tools.Predictor preview 5
    Install-module -name Az.Tools.Predictor -RequiredVersion 0.5.0
    More details about Az.Tools.Predictor: https://www.powershellgallery.com/packages/Az.Tools.Predictor/0.5.0

  4. Enable Az Predictor
    Enable-AzPredictor -AllSession
    This command will enable Az Predictor in all further sessions of the current user.

 

Note: Due to underlying API breaking changes, Az.Tools.Predictor preview 3 or newer are not compatible with PowerShell 7.2.0-preview.6 or newer. Upgrade to preview 5 of Az.Tools.Predictor to be compatible with PowerShell 7.2.0-preview.6 or newer and PS Readline 2.2.0-beta3 or newer.

 

Inline view mode (default)

Once enabled, the default view is the "inline view" as shown in the following screen capture: 

 

AzPredictor-preview2-inlineview.png

 

This mode show only one suggestion at a time. The suggestion can be accepted by pressing the right arrow or you can continue to type. The suggestion will dynamically adjust based on the text that you have typed.

You can accept the suggestion at any time then come back and edit the command that is on your prompt. 

 

List view mode

This is definitely my favorite mode!

Switch to this view either by using the "F2" function key on your keyboard or run the following command: 

Set-PSReadLineOption -PredictionViewStyle ListView

This mode shows in the a list down your current prompt a list of possible match for the command that you are typing. It combines suggestions from the history as well as suggestions from Az Predictor.

 

Select a suggestion and then navigate through the parameter values with "Alt + A" to quickly fill replace the proposed values with yours.

 

AzPredictor-preview2-dynamichelp.png

 

 

What’s next?

We are looking for feedback on this second preview.

We will continue to improve our predictor in the coming months. Stay tuned for our next update of the module.


Tell us about your experience. What do you like or dislike about Az Predictor? http://aka.ms/azpredictorsurvey

 

Further Reading

 

 

Published on:

Learn more
Azure Tools Blog articles
Azure Tools Blog articles

Azure Tools Blog articles

Share post:

Related posts

Unlocking the Best of Azure with AzureRM and AzAPI Providers

With the recent release of AzAPI 2.0, Azure offers two powerful Terraform providers to meet your infrastructure needs: AzureRM and AzAPI. The ...

1 year ago

Announcing AzAPI 2.0

The AzAPI provider, designed to expedite the integration of new Azure services with HashiCorp Terraform, has now released 2.0. This updated ve...

1 year ago

Azure CLI docker container base Linux image is now Azure Linux

Starting from the version  2.64.0 of Azure CLI, the base Linux distribution of Azure CLI is now Azure Linux.   Impact of the change ...

1 year ago

Mastering the Shorthand Syntax in your daily workflow

Introduction In this tech blog, we'll unravel the magic behind Azure CLI shorthand syntax and discover how it can elevate your command-line ex...

2 years ago

Azure Verified Modules - Monthly Update [June]

AVM Module Summary The AVM team are excited that our community have been busy building AVM Modules. As of June 17th, the AVM Footprint curren...

2 years ago

Azure Verified Modules - Monthly Update [May]

Quarterly Community Call This month we held our first community call. Thank you to everyone that attended & contributed. It was amazing t...

2 years ago

Azure CLI and PowerShell Tools Build 2024 Announcement

Microsoft has announced several new capabilities for Azure CLI and Azure PowerShell at the Microsoft Build 2024. The priority remains to provi...

2 years ago

Terraform on Azure May 2024 Update

    Welcome to our April 2024 update! These blogposts will be covering everything we've gotten up to recently with Terraform on Azu...

2 years ago

Azure Verified Modules - Monthly Update [April]

In the April edition of the Azure Verified Modules update, the AVM team announces their upcoming quarterly community call scheduled for 21st M...

2 years ago

Announcing AzAPI Dynamic Properties

  It’s been almost two years since the announcement of AzAPI, and the provider has eclipsed 20M+ downloads thanks to all of you. We’re ex...

2 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.