Search notes:

PowerShell: subexpression operator

The subexpression operator ($(…)) is primarily used in strings. It evaluates the expression within its parentheses and «merges» the result into the string.
$dt = get-date

write-host "Today is day $($dt.dayOfYear) in the year."
Github repository about-PowerShell, path: /language/operator/subexpression/dayOfYear.ps1

See also

The subexpression operator is only recognized in argument parsing mode
operator

Index