Azure – A new PowerShell module – Az Predictor – is in preview

If you work with workloads running on Azure you probably also work with the Azure PowerShell modules.

If you work with Azure PowerShell modules you also know there is a lot of commands and parameters available (about 4 000 commands and an average of 10 parameters per command).

This make it difficult to always have the right command and/or parameter.

Well good news the team has been working on a new module to help you with that: Az Predictor, currently in preview.

Before you start jumping installing the new module, you need to meet some prerequisites:

Install-Module PSReadline -Force

image

Now you are ready to install the Az Predictor module using the command

Install-Module -Name Az.Tools.Predictor

NOTE if you did not previously installed Azure PowerShell modules using either MSI package or did not install the Az.Account you will have to do it before

image

After having installed the Predictor module you will need to import it and enable the plug-in

Import-Module Az.Tools.Predictor

Enable-AzPredictor -AllSession

I have changed the text and background color to make it more visible.

Now when you start typing a command, you will get the first available command and common parameters showing up (here the Get-AzSubscription and Get-AzKeyVaultSecret commands)

image  image

Now if you use the below command, you will get a better result with the list of commands available and parameters

Set-PSReadLineOption -PredictionViewStyle ListView

image

Enjoy

Leave a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.