Quick tip: Removing warning messages from Azure cmdlets

Microsoft Azure is a dynamic environment and changes will happen, whether you like it or not. Microsoft issues a warning message to users of Azure cmdlets that the cmdlet they are using will be changed. They will get this warning every time that the cmdlet is used. When you are scripting, such changes will not impact you. So, there is no point to keep receiving those warning messages. An example of the warning message can be seen in the image below. In this case, I was creating subnets. However, I was not using the “breaking changes” that they will perform.

Azure cmdlets warning messages

To remove the error messages, an environment variable can be added to the current session. Keep in mind that all messages will be suppressed, so proceed with caution.

Set-Item Env:\SuppressAzurePowerShellBreakingChangeWarnings "true"

After running the line above, the same Azure cmdlet does not show the warning message.

Azure cmdlets warning messages

Featured image: Pixabay

About The Author

Leave a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top