2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Powershell で Azure Table Storage から Timestamp でフィルタした行を取得する

Last updated at Posted at 2020-06-23

前提

AzTable モジュールを使う
https://www.powershellgallery.com/packages/AzTable/2.0.1

実装

  1. テーブルオブジェクトを取得する
  2. -CustomFilter にクエリを書く
    時刻は datetime'YYYY-MM-DDTHH:mm:ssZ' の形式で書ける
$table = Get-AzTableTable -resourceGroup "{resource group name}" -TableName "table name" -storageAccountName "storage account name"
# 2020/1/1 0:00 AM 以前のレコードを取得
Get-AzTableRow -Table $table -CustomFilter "Timestamp lt datetime'2020-01-01T00:00:00Z'"

参考

https://docs.microsoft.com/en-us/azure/storage/tables/table-storage-how-to-use-powershell
https://docs.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities
https://github.com/paulomarquesc/AzureRmStorageTable

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?