![](/img/trans.png)
[英]Remove/Delete all resources created while spinning a new VM through powershell
[英]Remove-AzDeployment does not remove the resources created
我正在使用 ARM 腳本創建一個 StorageAccount & Containers
我使用 New-AzDeployment 創建資源。 資源已正確創建。 我想刪除部署
當我運行 Remove-AzDeployment -Name; 部署被刪除,但資源沒有被刪除。
如何確保資源也被刪除。 我在 powershell 中使用新的 Az 模塊,而不是舊的 Azure 模塊
Remove-AzDeployment cmdlet 用於從部署歷史記錄中刪除部署。 它不會刪除在此特定部署中部署的資源。
可以使用 Remove-AzResource 從資源組中刪除資源,如下所示:
Get-AzResource -ResourceGroupName $ResourceGroupName | Remove-AzResource -Force
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.