【发布时间】:2021-12-04 03:16:50
【问题描述】:
我需要使用 windows powershell ISE 将 powershell json 输出存储到 azure 存储帐户中。 eg: "$result" 是要存储在 storage account 中的输出文件
【问题讨论】:
-
请编辑问题以将其限制为具有足够详细信息的特定问题,以确定适当的答案。
标签: powershell azure-blob-storage
我需要使用 windows powershell ISE 将 powershell json 输出存储到 azure 存储帐户中。 eg: "$result" 是要存储在 storage account 中的输出文件
【问题讨论】:
标签: powershell azure-blob-storage
我已经在我的环境中测试过。
首先,我们可以使用以下命令将 PowerShell JSON 输出存储在本地文件中:
$result | out-file /path/to/file
然后我们可以使用以下命令将文件从本地复制到 azure 存储帐户:
az storage blob upload --account-name mystorageaccount --account-key 0000-0000 --container-name mycontainer --file /path/to/file --name myblob
【讨论】: