This Azure PowerShell article 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 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" -ForceAfter 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 articles below
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 !!!

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.
