| external help file | Module Name | online version | schema |
|---|---|---|---|
AzureRmStorageTableCoreHelper-help.xml |
azurermstoragetable |
2.0.0 |
Updates a table entity
Update-AzTableRow [-Table] <Object> [-entity] <Object> [<CommonParameters>]Updates a table entity. To work with this cmdlet, you need first retrieve an entity with one of the Get-AzTableRow cmdlets available and store in an object, change the necessary properties and then perform the update passing this modified entity back, through Pipeline or as argument. Notice that this cmdlet accepts only one entity per execution. This cmdlet cannot update Partition Key and/or RowKey because it uses those two values to locate the entity to update it, if this operation is required please delete the old entity and add the new one with the updated values instead.
# Updating an entity
[string]$Filter = [Microsoft.Azure.Cosmos.Table.TableQuery]::GenerateFilterCondition("firstName",[Microsoft.Azure.Cosmos.Table.QueryComparisons]::Equal,"User1")
$person = Get-AzTableRowByCustomFilter -Table $Table -CustomFilter $Filter
$person.lastName = "New Last Name"
$person | Update-AzTableRow -Table $TableTable object of type Microsoft.Azure.Cosmos.Table.CloudTable where the entity exists
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe entity/row with new values to perform the update.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).