Skip to content

AddOrReplace

SYNOPSIS

Sets the piped field to a value, replacing any value it has. Use inside Modify.

SYNTAX

AddOrReplace [-InputObject <Object>] [[-Value] <Object>] [-Condition <Object>] [<CommonParameters>]

USED IN

Modify

EXAMPLES

Example 1

Tag Environment | AddOrReplace 'Production'

PARAMETERS

-InputObject

The field to change: a Field or Tag, piped to the operation.

Type: Object
Required: false
Position: named
Accept pipeline input: true (ByValue)

-Value

The value to set: a literal, Param, Arm or ResourceGroupTag.

Type: Object
Required: false
Position: 1
Accept pipeline input: false

-Condition

Only apply the operation when this Arm expression is true.

Type: Object
Required: false
Position: named
Accept pipeline input: false