I have a script to update the entities in table storage (https://learn.microsoft.com/en-us/azure/storage/tables/table-storage-how-to-use-powershell#updating-entities):
[string]$filter = `
[Microsoft.Azure.Cosmos.Table.TableQuery]::GenerateFilterCondition("Period",`
[Microsoft.Azure.Cosmos.Table.QueryComparisons]::Equal,6)
$users = Get-AzTableRow `
-table $cloudTable `
-customFilter $filter
foreach ($user in $users)
{
$user.Period = 24
$user | Update-AzTableRow -table $cloudTable
}
This doesn't work. What am I missing?
I tried in my environment and successfully updated the period in the entities:
I followed this MS-DOCS to add the four table entities to table storage in my environment.
Code:
Output:
To update entity:
The above command executed successfully and updated
Period 7 to 24.Console: