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 PowerShell 7 by following any of the installation option available at https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.2
- Install PSReadline 2.2 using the command
Install-Module PSReadline -Force
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
After having installed the Predictor module you will need to import it and enable the plug-in
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)
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