You can remove the dollar sign and use only
Write-Host ([math]::round($diff.TotalMinutes, 2))
Brackets are necessary for the analyzer, so the expression is evaluated first, and then bound to the parameter -Object. There are some rules when a parser expects a string to be an expression, and when it treats it as a string and passes it to the command without evaluation. More information can be found in PowerShell in action .
Dollar sign needed if more expressions are shared ;
Write-Host $(get-date; 1; "test")
source
share