I am finding what seems to be an inconsistency to the way a Write-Output line (which prints out a variable) should be formatted. I can't find any information on this, which makes me guess that I am misunderstanding what I am seeing.
For most simple variables, the below will work:
Write-Output " This $testValue will print just fine."
However, I need to add a $() to the Write-Output line if the variable is part of an object:
Write-Output $("Removing old software from directory: " + $site.INSTALLDIR)
Question: Is the above statement correct?