【发布时间】:2021-12-31 09:31:05
【问题描述】:
我想使用 PowerShell 7.1.4 将数据从 Azure 表存储提取到 CSV 文件
这是我的 PS 脚本:
$StorageAccountName = ""
$StorageAccountKey = ""
$table = ""
$Ctx = New-AzureStorageContext –StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
$table = Get-AzureStorageTable –Name $TableName -Context $Ctx
$query = New-Object "Microsoft.WindowsAzure.Storage.Table.TableQuery"
$query.FilterString = "(Timestamp ge datetime'2021-12-30T06:00:00Z' and Timestamp lt datetime'2021-12-30T12:00:00Z')"
$data = $table.CloudTable.ExecuteQuery($query)
我收到以下错误:
> $data = $table.CloudTable.ExecuteQuery($query)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find an overload for "ExecuteQuery" and the argument count: "1".
【问题讨论】:
-
将 Aztable 添加为更新
标签: powershell azure-powershell azure-table-storage