Announcing General Availability of Az.Tools.Predictor

Published Apr 28 2022 10:18 AM 1,822 Views
Microsoft

On November 10, 2020, we announced the first preview of Az.Tools.Predictor, a PowerShell module suggesting the Azure cmdlet to use with parameters and suggested values.


Today, we are announcing the general availability of Az.Tools.Predictor.

 

How it all started

During a study about a new module for Azure, I was surprised to see how difficult it was for the participant to find the correct cmdlet to use. Later, I was summarizing the learnings of the study, and though it would be great if we could have a solution that could help people finding the right cmdlet to use.

 

At the same time, we were starting to work on Predictive IntelliSense in PowerShell and after a couple of meetings with Jason Helmick, it became clear that this would be a great mechanism to address the challenge I had seen few days before by providing, in the command line, suggestions about cmdlet to use.


We quickly thought that some form of AI could help providing accurate recommendations so we involved Roshanak, Yevhen and Maoliang from our data science team to work with us on how we could build an engine that would provide recommendations for PowerShell cmdlets based on the user’s context.

 

Behind the scenes

Once a functional prototype was built, we wanted to confirm its usability before considering any public previews.
For our team usability is important, over time certain key combinations became a reflex and we knew that we had to fit in the existing memory muscle and become intuitive for PowerShell. For predictors to be successful, we organized several usability studies with prototypes of Az Predictors and addressed several improvements, like the color of the suggested text or the key combination to use to accept or navigate amongst predictions.


One of our initial prototypes was using the color scheme below, we wanted to have a clear color-based differentiation between typed characters and suggestions hoping this would help user navigate the suggestion. We worked with our design team to address the issue and evolve our design towards the current design.

 

AzPredictor-proto1.jpg

We also evaluated if the information provided in the suggestions is helpful. Below is another of our early designs. By listening to our customers and observing how they are using the tool, we learned that showing cmdlets first then parameters and associated value samples was not as useful as showing the full line and not using more space in the terminal which is our current design.

AzPredictor-proto2.jpg

During the last months we have done a few previews (read about preview 5) to stabilize the module as PowerShell and PS Readline which we depend on became stable. We have also improved our model based on the feedback we have collected and addressed issues reported.

 

Getting started

We would like to invite you to try the stable version of Az.Tools.Predictor.
To get started, follows these steps:

  1. Install or upgrade PowerShell v7.2
    https://docs.microsoft.com/powershell/scripting/install/installing-powershell
  2. Install or upgrade PSReadline 2.2
    Install-Module -Name PSReadLine -Force
  3. Install or upgrade Az.Tools.Predictor
    Install-module -name Az.Tools.Predictor -Force
  4. Enable Az Predictor
    Enable-AzPredictor -AllSession

 

Once installed, it is recommended that you restart your PowerShell sessions.

For more details, visit the Az Predictor documentation page: https://docs.microsoft.com/powershell/azure/az-predictor

 

Inline view mode (default)

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

InlineView-1.jpgInlineView-2.jpg

This mode shows 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 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 from your current prompt a list of possible matches for the command that you are typing. It combines suggestions from your local history and 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.

ListView-1.jpg

 

Next steps

This is just the beginning of our journey to improving the usability of Azure PowerShell!

We will be carefully listening to every feedback that you send us: 

We will share soon more about how we plan to expand this experience to other environments.

 

Credits

“It takes a village to raise a child” Az.Tools.Predictor is the result of the close collaboration of several teams distributed across continents and time zones working hard during the pandemic.

 

%3CLINGO-SUB%20id%3D%22lingo-sub-3297956%22%20slang%3D%22en-US%22%3EAnnouncing%20General%20Availability%20of%20Az.Tools.Predictor%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3297956%22%20slang%3D%22en-US%22%3E%3CP%3EOn%20November%2010%2C%202020%2C%20we%20announced%20the%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-tools-blog%2Fannouncing-az-predictor%2Fba-p%2F1873104%22%20target%3D%22_self%22%3Efirst%20preview%20of%20Az.Tools.Predictor%3C%2FA%3E%2C%20a%20PowerShell%20module%20suggesting%20the%20Azure%20cmdlet%20to%20use%20with%20parameters%20and%20suggested%20values.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3EToday%2C%20we%20are%20announcing%20the%20general%20availability%20of%20Az.Tools.Predictor.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-395699165%22%20id%3D%22toc-hId-416012784%22%3EHow%20it%20all%20started%3C%2FH2%3E%0A%3CP%3EDuring%20a%20study%20about%20a%20new%20module%20for%20Azure%2C%20I%20was%20surprised%20to%20see%20how%20difficult%20it%20was%20for%20the%20participant%20to%20find%20the%20correct%20cmdlet%20to%20use.%20Later%2C%20I%20was%20summarizing%20the%20learnings%20of%20the%20study%2C%20and%20though%20it%20would%20be%20great%20if%20we%20could%20have%20a%20solution%20that%20could%20help%20people%20finding%20the%20right%20cmdlet%20to%20use.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAt%20the%20same%20time%2C%20we%20were%20starting%20to%20work%20on%20Predictive%20IntelliSense%20in%20PowerShell%20and%20after%20a%20couple%20of%20meetings%20with%20Jason%20Helmick%2C%20it%20became%20clear%20that%20this%20would%20be%20a%20great%20mechanism%20to%20address%20the%20challenge%20I%20had%20seen%20few%20days%20before%20by%20providing%2C%20in%20the%20command%20line%2C%20suggestions%20about%20cmdlet%20to%20use.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EWe%20quickly%20thought%20that%20some%20form%20of%20AI%20could%20help%20providing%20accurate%20recommendations%20so%20we%20involved%20Roshanak%2C%20Yevhen%20and%20Maoliang%20from%20our%20data%20science%20team%20to%20work%20with%20us%20on%20how%20we%20could%20build%20an%20engine%20that%20would%20provide%20recommendations%20for%20PowerShell%20cmdlets%20based%20on%20the%20user%E2%80%99s%20context.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1411755298%22%20id%3D%22toc-hId--1391441679%22%3EBehind%20the%20scenes%3C%2FH2%3E%0A%3CP%3EOnce%20a%20functional%20prototype%20was%20built%2C%20we%20wanted%20to%20confirm%20its%20usability%20before%20considering%20any%20public%20previews.%3CBR%20%2F%3EFor%20our%20team%20usability%20is%20important%2C%20over%20time%20certain%20key%20combinations%20became%20a%20reflex%20and%20we%20knew%20that%20we%20had%20to%20fit%20in%20the%20existing%20memory%20muscle%20and%20become%20intuitive%20for%20PowerShell.%20For%20predictors%20to%20be%20successful%2C%20we%20organized%20several%20usability%20studies%20with%20prototypes%20of%20Az%20Predictors%20and%20addressed%20several%20improvements%2C%20like%20the%20color%20of%20the%20suggested%20text%20or%20the%20key%20combination%20to%20use%20to%20accept%20or%20navigate%20amongst%20predictions.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EOne%20of%20our%20initial%20prototypes%20was%20using%20the%20color%20scheme%20below%2C%20we%20wanted%20to%20have%20a%20clear%20color-based%20differentiation%20between%20typed%20characters%20and%20suggestions%20hoping%20this%20would%20help%20user%20navigate%20the%20suggestion.%20We%20worked%20with%20our%20design%20team%20to%20address%20the%20issue%20and%20evolve%20our%20design%20towards%20the%20current%20design.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AzPredictor-proto1.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367709iCDBE09EB5B64CA67%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22AzPredictor-proto1.jpg%22%20alt%3D%22AzPredictor-proto1.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWe%20also%20evaluated%20if%20the%20information%20provided%20in%20the%20suggestions%20is%20helpful.%20Below%20is%20another%20of%20our%20early%20designs.%20By%20listening%20to%20our%20customers%20and%20observing%20how%20they%20are%20using%20the%20tool%2C%20we%20learned%20that%20showing%20cmdlets%20first%20then%20parameters%20and%20associated%20value%20samples%20was%20not%20as%20useful%20as%20showing%20the%20full%20line%20and%20not%20using%20more%20space%20in%20the%20terminal%20which%20is%20our%20current%20design.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AzPredictor-proto2.jpg%22%20style%3D%22width%3A%20597px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367710i251C4A4F1665123C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22AzPredictor-proto2.jpg%22%20alt%3D%22AzPredictor-proto2.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EDuring%20the%20last%20months%20we%20have%20done%20a%20few%20previews%20(read%20about%20preview%205)%20to%20stabilize%20the%20module%20as%20PowerShell%20and%20PS%20Readline%20which%20we%20depend%20on%20became%20stable.%20We%20have%20also%20improved%20our%20model%20based%20on%20the%20feedback%20we%20have%20collected%20and%20addressed%20issues%20reported.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1075757535%22%20id%3D%22toc-hId-1096071154%22%3EGetting%20started%3C%2FH2%3E%0A%3CP%3EWe%20would%20like%20to%20invite%20you%20to%20try%20the%20stable%20version%20of%20Az.Tools.Predictor.%20%3CBR%20%2F%3ETo%20get%20started%2C%20follows%20these%20steps%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EInstall%20or%20upgrade%20PowerShell%20v7.2%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fpowershell%2Fscripting%2Finstall%2Finstalling-powershell%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fpowershell%2Fscripting%2Finstall%2Finstalling-powershell%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EInstall%20or%20upgrade%20PSReadline%202.2%3CPRE%3EInstall-Module%20-Name%20PSReadLine%20-Force%3C%2FPRE%3E%0A%3C%2FLI%3E%0A%3CLI%3EInstall%20or%20upgrade%20Az.Tools.Predictor%3CPRE%3EInstall-module%20-name%20Az.Tools.Predictor%20-Force%3C%2FPRE%3E%0A%3C%2FLI%3E%0A%3CLI%3EEnable%20Az%20Predictor%3CPRE%3EEnable-AzPredictor%20-AllSession%3C%2FPRE%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20installed%2C%20it%20is%20recommended%20that%20you%20restart%20your%20PowerShell%20sessions.%3C%2FP%3E%0A%3CP%3EFor%20more%20details%2C%20visit%20the%20Az%20Predictor%20documentation%20page%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fpowershell%2Fazure%2Faz-predictor%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fpowershell%2Fazure%2Faz-predictor%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1766319009%22%20id%3D%22toc-hId-1786632628%22%3EInline%20view%20mode%20(default)%3C%2FH3%3E%0A%3CP%3EOnce%20enabled%2C%20the%20default%20view%20is%20the%20%22inline%20view%22%20as%20shown%20in%20the%20following%20screen%20capture%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22InlineView-1.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367714iDF16EFEC620EE084%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22InlineView-1.jpg%22%20alt%3D%22InlineView-1.jpg%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22InlineView-2.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367715i27A3BBA415C2788A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22InlineView-2.jpg%22%20alt%3D%22InlineView-2.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThis%20mode%20shows%20only%20one%20suggestion%20at%20a%20time.%20The%20suggestion%20can%20be%20accepted%20by%20pressing%20the%20right%20arrow%20or%20you%20can%20continue%20to%20type.%20The%20suggestion%20will%20dynamically%20adjust%20based%20on%20the%20text%20that%20you%20have%20typed.%3CBR%20%2F%3EYou%20can%20accept%20the%20suggestion%20at%20any%20time%20then%20come%20back%20and%20edit%20the%20command%20that%20is%20on%20your%20prompt.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--41135454%22%20id%3D%22toc-hId--20821835%22%3EList%20view%20mode%3C%2FH3%3E%0A%3CP%3EThis%20is%20my%20favorite%20mode!%3C%2FP%3E%0A%3CP%3ESwitch%20to%20this%20view%20either%20by%20using%20the%20%22F2%22%20function%20key%20on%20your%20keyboard%20or%20run%20the%20following%20command%3A%3C%2FP%3E%0A%3CPRE%3ESet-PSReadLineOption%20-PredictionViewStyle%20ListView%3C%2FPRE%3E%0A%3CP%3EThis%20mode%20shows%20from%20your%20current%20prompt%20a%20list%20of%20possible%20matches%20for%20the%20command%20that%20you%20are%20typing.%20It%20combines%20suggestions%20from%20your%20local%20history%20and%20from%20Az%20Predictor.%3C%2FP%3E%0A%3CP%3ESelect%20a%20suggestion%20and%20then%20navigate%20through%20the%20parameter%20values%20with%20%22%3CSTRONG%3EAlt%20%2B%20A%3C%2FSTRONG%3E%22%20to%20quickly%20fill%20replace%20the%20proposed%20values%20with%20yours.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ListView-1.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367716iF84FAF81CF33111D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22ListView-1.jpg%22%20alt%3D%22ListView-1.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--51638558%22%20id%3D%22toc-hId--31324939%22%3ENext%20steps%3C%2FH2%3E%0A%3CP%3EThis%20is%20just%20the%20beginning%20of%20our%20journey%20to%20improving%20the%20usability%20of%20Azure%20PowerShell!%3C%2FP%3E%0A%3CP%20data-unlink%3D%22true%22%3EWe%20will%20be%20carefully%20listening%20to%20every%20feedback%20that%20you%20send%20us%3A%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%20data-unlink%3D%22true%22%3EOpen%20%3CSPAN%3Ean%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-powershell%2Fissues%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Eissue%20on%20GitHub%3C%2FA%3E%20to%20report%20a%20problem%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-unlink%3D%22true%22%3ETell%20us%20about%20your%20experience%20using%20this%20survey%3A%26nbsp%3B%3CSPAN%3E%3CA%20href%3D%22http%3A%2F%2Faka.ms%2Fazpredictorsurvey%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Faka.ms%2Fazpredictorsurvey%3C%2FA%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-unlink%3D%22true%22%3EReach%20out%20to%20us%20on%20Twitter%3A%20%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2Fazureposh%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%40azureposh%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EWe%20will%20share%20soon%20more%20about%20how%20we%20plan%20to%20expand%20this%20experience%20to%20other%20environments.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1859093021%22%20id%3D%22toc-hId--1838779402%22%3ECredits%3C%2FH2%3E%0A%3CP%3E%E2%80%9CIt%20takes%20a%20village%20to%20raise%20a%20child%E2%80%9D%20%3CA%20href%3D%22http%3A%2F%2Faka.ms%2Fazpredictor%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EAz.Tools.Predictor%3C%2FA%3E%20is%20the%20result%20of%20the%20close%20collaboration%20of%20several%20teams%20distributed%20across%20continents%20and%20time%20zones%20working%20hard%20during%20the%20pandemic.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-3297956%22%20slang%3D%22en-US%22%3E%3CP%3EToday%20we%20are%20announcing%20the%20general%20availability%20of%20Az.Tools.Predictor%2C%20the%20PowerShell%20module%20providing%20Azure%20cmdlet%20recommendations.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3297956%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Apr 28 2022 10:18 AM
Updated by: