Share via


ReplaceMacro

Replace macro to the specified value.

Syntax

Default (Default)

ReplaceMacro
    [-Input] <String>
    [-Macro] <String>
    [[-Value] <String>]
    [<CommonParameters>]

Description

The ReplaceMacro cmdlet replaces the macro in input string with the specified value. Use Get-Help ReplaceMacro -Examples for more detail.

Examples

EXAMPLE 1

ReplaceMacro -Macro "{apiVersion}"  -Value $ApiVersion

Replace {apiVersion} to $ApiVersion.

Parameters

-Input

The input string.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Macro

The macro to be replaced.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Value

The value for the replacement.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.