如何使用 powershell 从 Azure Table 存储中删除 属性?

How do I remove a property from Azure Table Storage with powershell?

我尝试使用此代码从 table 中删除 属性:

$propertiesToRemove = @("Prop1", "Prop2")
$row = Get-AzTableRow -Table $cloudTable -PartitionKey "PK" -RowKey $id
$propertiesToRemove | %{ $row.PSObject.Properties.Remove($_) }
Update-AzTableRow -Table $cloudTable -entity $row

但这让他们保持原样。我如何使用 powershell 执行此操作?

假设您正在使用 AzureRmStorageTable, I don't think it is possible to remove properties from a table because Update-AzTableRow performs an InsertOrMerge operation instead of either Replace or InsertOrReplace 操作。

来自source code

return ($Table.Execute([Microsoft.Azure.Cosmos.Table.TableOperation]::InsertOrMerge($updatedEntity)))