删除资源和资源组

已完成

删除资源组时要格外小心。 删除资源组会删除其包含的所有资源。 该资源组可能包含其他资源组中的资源所依赖的资源。

Screenshot showing the Delete resource group button (highlighted) in the portal.

使用 PowerShell 删除资源组

若要删除资源组,请使用 Remove-AzResourceGroup。 在此示例中,我们将从订阅中删除 ContosoRG01 资源组。 cmdlet 会提示你进行确认,并且不返回任何输出。

Remove-AzResourceGroup -Name "ContosoRG01"

删除资源

也可以删除资源组中的单个资源。 例如,这里我们将删除虚拟网络。 你可以将资源移至另一个资源组,而不是删除。

Screenshot from the portal of the route table page, with the Delete button highlighted to show you can delete an individual resource within a resource group.