gpt4 book ai didi

powershell - 调用-AzureRmResourceAction : The pipeline has been stopped

转载 作者:行者123 更新时间:2023-12-03 04:28:41 28 4
gpt4 key购买 nike

执行Invoke-AzureRmResourceAction poweshell 命令时有时会出现以下异常。

Invoke-AzureRmResourceAction : The pipeline has been stopped. Invoke-AzureRmResourceAction -ResourceGroupName $resourceGroupName -R ... + CategoryInfo : CloseError: (:) [Invoke-AzureRmResourceAction], PipelineStoppedException + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.InvokAzureResourceAction Cmdlet

我应该如何处理这个错误?我应该捕获它并重试吗?通常只需重新运行该命令即可。

最佳答案

如果您正在使用 ForEach-Object commandlet,请尝试将其替换为 foreach 语句。

# your code like this
Get-Something | ForeachObject {Invoke-AzureRmResourceAction $_}
# replace with this
foreach ($Obj in Get-Something) {
Invoke-AzureRmResourceAction $Obj
}

关于powershell - 调用-AzureRmResourceAction : The pipeline has been stopped,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39828311/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com