gpt4 book ai didi

azure - 将 Azure RM 值放入变量中

转载 作者:行者123 更新时间:2023-12-03 02:49:19 25 4
gpt4 key购买 nike

当我在 Azure powershell 任务中运行此代码时

Get-AzureRmStorageAccount -ResourceGroupName "****V2"
$storageAccounts = Get-AzureRmStorageAccount -ResourceGroupName "****V2"
Write-Host $storageAccounts
Write-Host $storageAccounts.value

我明白了:

enter image description here

Get-AzureRmStorageAccount -ResourceGroupName "****V2" 返回列表,但变量显示为空。是否不能将返回值存储在变量上?

最佳答案

我可以重现您的问题,应该如下所示。

$storageAccounts = Get-AzStorageAccount -ResourceGroupName "joywebapp" | ft
Write-Output $storageAccounts

在 devops powershell 任务中:

enter image description here

关于azure - 将 Azure RM 值放入变量中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56956714/

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