Context:
You can expand variables in a string like:
> $var = "123" > Write-Host "$var" 123 >
Problem:
You can’t expand array with index:
> $arr = @("456", "789") > Write-Host "$arr[0]" 456 789[0]
It is also ineffective to add braces:
> Write-Host "${arr}[0]" 456 789[0] > Write-Host "${arr[0]}" >
Reason:
It seems by design.
Solution:
You should to use placeholders and -F option like:
> Write-Host ("{0}" -F $arr[0]) 456