Tec*_*bic 2 azure azure-storage-blobs azure-powershell
与此问题类似如何获取Azure CloudBlobContainer的大小
如何在PowerShell中获取Azure容器的大小.我可以在https://gallery.technet.microsoft.com/scriptcenter/Get-Billable-Size-of-32175802上看到建议的脚本,但想知道在PowerShell中是否有更简单的方法
小智 5
使用Azure PowerShell,您可以Get-AzureStorageBlob使用Container和Context参数列出容器中的所有blob,例如:
$ctx = New-AzureStorageContext -StorageAccountName youraccountname -storageAccountKey youraccountkey
$blobs = Get-AzureStorageBlob -Container containername -Context $ctx
Run Code Online (Sandbox Code Playgroud)
输出Get-AzureStorageBlob是一个数组AzureStorageBlob,其中包含一个带有名称的属性ICloudBlob,您可以在其中获取blob长度 Properties,然后您可以将所有blob的长度相加以获得容器的内容长度.
| 归档时间: |
|
| 查看次数: |
3217 次 |
| 最近记录: |