In this Azure PowerShell article, we will discuss the syntax and usage of the Clear-AzDefault PowerShell command with an example of implementation.
Clear-AzDefault
This PowerShell command can help you to clear the current context default values set by the user.
Syntax
Below is the syntax of the Clear-AzDefault PowerShell command.
Clear-AzDefaultClear-AzDefault -ForceClear-AzDefault
[-ResourceGroup]Let’s discuss how to use the Clear-AzDefault Azure PowerShell command with an example.
Example
You can execute the below PowerShell command to clear or removes all the current context default values that are set by user.
Clear-AzDefaultAfter executing the above command, it asked me to confirm the removal process by prompting with the below pop-up, I just clicked on the Yes button to confirm.

Now, it removed the default values successfully. You can see the below screenshot.

If you wish to skip the confirmation pop-up, then you can directly run the below PowerShell command.
Clear-AzDefault -ForceClear-AzDefault – Video Tutorial
You may also like following the below articles
Wrapping Up
In this Azure PowerShell article, we discussed the syntax and usage of the Clear-AzDefault PowerShell command with examples of how to use the Clear-AzDefault PowerShell command. Thanks for reading this article !!!

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
