In this Azure PowerShell article, we will discuss the syntax and usage of the Remove-AzResource Azure PowerShell cmdlet with examples.
Table of Contents
Remove-AzResource
If you don’t want an Azure resource anymore and wish to remove it then you can use the Remove-AzResource Azure PowerShell cmdlet and easily remove the resource in a span of seconds.
Syntax
Below is the syntax of the Remove-AzResource Azure PowerShell command.
Remove-AzResource
-ResourceId <String>
[-Force]
Remove-AzResource
-ResourceName <String>
-ResourceType <String>
[-ResourceGroupName <String>]
[-Force]
Well, let’s discuss an example of the usage of the Remove-AzResource Azure PowerShell cmdlet.
Example
Execute the below code that will help you to remove the TsInfoWeb website resource.
Remove-AzResource -ResourceId "/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourcegroups/MyNewResGrp/providers/Microsoft.Web/sites/TsInfoweb" -Force
After executing the above PowerShell cmdlet, I got the output as “True” and the web resource has been deleted successfully without any issue.
You can check the output below

You may also like following the below articles
Wrapping Up
In this Azure article, we discussed the syntax and usage of the Remove-AzResource Azure PowerShell cmdlet with examples. Thanks for reading this article !!!