PowerShell Strings Format string


Example

$hash = @{ city = 'Berlin' }

$result = 'You should really visit {0}' -f $hash.city
Write-Host $result #prints "You should really visit Berlin"

Format strings can be used with the -f operator or the static [String]::Format(string format, args) .NET method.