Azure Tools Blog articles

Azure Tools Blog articles

https://techcommunity.microsoft.com/t5/azure-tools-blog/bg-p/AzureToolsBlog

Azure Tools Blog articles

Azure PowerShell Ignite 2022 announcements

Published

Azure PowerShell Ignite 2022 announcements

We are announcing the general availability of Azure PowerShell modules version 9. This new version features the following new or improved capabilities:

  • Added 12 new modules supporting new services
  • Discovery mechanism for Azure cmdlets
  • Support for central configuration
  • New feedback mechanism for Azure PowerShell users

Following the release cadence we announced previously, this is the second version introducing breaking changes in 2022.

 

Support for new services and resource types

We are committed to making Azure resources manageable via the command line tool of your choice. Supporting this commitment, over the last 6 months, the Azure PowerShell modules have been released on average within 2 weeks of general availability of new Azure services.

As a result of this effort, we added 12 modules supporting new services and added more than 500 cmdlets. The new modules are initially released as preview to allow identification and fix of any issue and will graduate to GA about two months later.

 

Discovery of Azure cmdlets

Visit this blog article for detailed information about cmdlet discovery in Azure PowerShell.

 

Our team and the CloudShell team regularly receive issues about cmdlets not found which are caused in almost all cases by one of the following situations:

  • The cmdlet belongs to a module in preview which is not available by default in CloudShell or in the Az package
  • The cmdlet has gone through a breaking change and the customer is using the old version of the cmdlet

With Az 9 we are providing an actionable error message that indicates why a cmdlet is not found.

Scenario 1: Module is not installed

cmdlet-discovery-1.png

The message indicates the reason for the error and how to install the missing module. This applies to stable and preview modules.

 

Scenario 2: Cmdlet is mistyped

cmdlet-discovery-2.png

When a cmdlet is mistyped, we provide a list of possible cmdlets available in the environment.

 

Scenario 3: Breaking changes

cmdlet-discovery-3.png

 

When a cmdlet is no longer available, for example it has been removed in a previous version of Azure PowerShell, the error message includes when the breaking change happened and a link to the associated documentation.

 

Central configuration – Az Config

Azure PowerShell supports several possible global settings like disabling breaking change warning messages, but we did not provide a central and granular way to set them.

With Az 9, we are adding the following cmdlets to provide a central and granular way to configure the Azure PowerShell settings.

[Clear|Export|Get|Import|Update]-AzConfig 

 

“Applies to” (Granularity)

Besides the usual PowerShell scopes, the settings can now be applied to Az or just for a single module. With the `-AppliesTo` parameter you can specify how broad you want the setting to be, `Az` indicates all modules available as part of Azure PowerShell.

In this example, the breaking changes warning message has been disabled for the Az.Compute module but remains active for the other modules in Az.

AzConfig-1.png

 

Default subscription

By default, when you authenticate to Azure, we retrieve all subscriptions that you can access, and the client will use the first subscription that is returned by Azure unless you specify the subscription with `Connect-AzAccount`. This behavior can be dangerous, for example if the first subscription returned is a production environment.

With Az Config you can now configure your default subscription.

AzConfig-2.png

 

Export settings

To facilitate replicating settings from one environment to another the settings supported by Az Config can be exported and imported in a JSON format.

AzConfig-3.png

 

Survey

The Azure command line tools team has always been actively listening to your feedback. With this release we are introducing a mechanism that will display an invitation to fill in a survey about your experience with the Azure PowerShell modules.

The message will be displayed no more than twice a year and is displayed as a PowerShell information message to not interfere with the output of the commands and mechanism that analyze it.

Note: The behavior can be controlled with AzConfig (described above), the central configuration mechanism mentioned above.

 

intercept-1.png

 

Upcoming breaking changes 

Starting with this release, we are making the following improvements to help you know when breaking change will happen in Azure PowerShell:

We will continue to publish the migration guide for each major release to help you migrate to the newer version of Az PowerShell.

We hope those changes in how we communicate about breaking changes will help you in your planning processes.

 

Thank you!

The Azure PowerShell team would like to thank you for using the PowerShell modules for Azure and renew our commitment to continue improving your experience with Azure Command line tools.

 

Feel free to contact us anytime:

 

Continue to website...

More from Azure Tools Blog articles