Clear-AzDefault

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-AzDefault
Clear-AzDefault -Force
Clear-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-AzDefault

After 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.

Clear-AzDefault PowerShell

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

Clear-AzDefault PowerShell

If you wish to skip the confirmation pop-up, then you can directly run the below PowerShell command.

Clear-AzDefault -Force

Clear-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 !!!