Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Remove-AzureRmResourceGroup powershell cmdlet出现卡滞_Powershell_Azure_Azure Resource Manager - Fatal编程技术网

Remove-AzureRmResourceGroup powershell cmdlet出现卡滞

Remove-AzureRmResourceGroup powershell cmdlet出现卡滞,powershell,azure,azure-resource-manager,Powershell,Azure,Azure Resource Manager,我正在尝试使用powershell删除以前创建的RM资源组。Remove-AzureRmResourceGroup命令似乎永远不会出现,控制权不会返回到控制台。以下是用于删除资源组的脚本 Login-AzureRmAccount $resourceGroupName="dummyResourceGroup" Get-AzureRmSubscription –SubscriptionName "Visual Studio Enterprise: BizSpark"| Select-AzureRmS

我正在尝试使用powershell删除以前创建的RM资源组。Remove-AzureRmResourceGroup命令似乎永远不会出现,控制权不会返回到控制台。以下是用于删除资源组的脚本

Login-AzureRmAccount
$resourceGroupName="dummyResourceGroup"
Get-AzureRmSubscription –SubscriptionName "Visual Studio Enterprise: BizSpark"| Select-AzureRmSubscription
Remove-AzureRmResourceGroup -Name $resourceGroupName
我尝试了以下步骤

  • 尝试再次从Azure门户删除,但资源组已被删除 删除按钮已禁用,橙色条中显示消息“正在删除”
  • 在新的powershell窗口中
    获取AzureRmResourceGroup-Name
    $resourceGroupName
    命令显示状态

    ResourceGroupName:dummyResourceGroup
    地点:澳大利亚东部
    ProvisioningState:删除

  • 尝试创建另一个同名资源组时出现消息
    New AzureRmResourceGroup:资源组“dummyResourceGroup”处于取消配置状态,无法执行此操作。


已经快3个小时了,我怀疑操作出错了,无法完成。非常感谢任何关于如何解决此问题的建议。

注意:这并不完全是问题的解决方案,但我采取的措施使我摆脱了困境

  • 在门户中,我注意到一个关于澳大利亚东部地区服务中断的警报,在我第一次开始部署时,该警报持续了大约2个小时
  • 即使在12个小时之后,我仍然要面对这个问题。我无法从门户或powershell中删除资源组
  • 我放弃了,创建了一个新的资源组,就好像被魔法删除了旧的资源组一样

可能您应该使用-Force参数尝试相同的命令
删除AzureRmResourceGroup-Name$resourceGroupName-Force
,如果问题仍然存在,就让它保留一天,然后打开支持票证。操作应完成或失败,并显示良好的错误消息。由于某些服务依赖关系,无法删除某些资源组-组中可能有一个服务(如Azure ML Workspace),该服务无法通过ARM使用。这将阻止删除资源组,但正如我所说的,错误消息将相当好。另外,请检查您的审核日志,以查看该操作是否有一些新消息。您的资源组是否有存储帐户,并且在存储帐户中有一个已租用的VHD blob?如果是这样,您需要先解除vhd blob的锁定,然后才能删除资源组。@我尝试了-force选项,但行为没有改变。@JackZeng当我运行命令时,此组中有存储帐户,这些帐户已被删除。实际上,除NSG之外的所有内容都被删除了。