我正在尝试从各种Azure存储上的表中自动执行查询。每周以不同的名称自动生成这些表
我正在寻找一种方法来自动生成给定存储上可用的表的列表,然后我可以使用foreach()函数来查询每个表。
我已经看过一些脚本,但是不能得到一些有效的东西,例如:
$response = Invoke-WebRequest -Uri 'https://MyAccountName.table.core.windows.net/Tables/'
[xml]$tables = $response.Content
$tableNames = $tables.feed.entry.content.properties.TableName发布于 2016-08-01 23:23:04
若要获取存储帐户中的表列表,你可以使用Azure PowerShell Cmdlet。完全不需要通过使用REST API来实现。您要使用的Cmdlet是Get-AzureStorageTable。
下面是一个示例代码:
$StorageAccountName = "your storage account name"
$StorageAccountKey = "your storage account key"
$ctx = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
Get-AzureStorageTable -Context $ctxhttps://stackoverflow.com/questions/38700128
复制相似问题