powershell Write-Output format
When you want to print object property values, then it should be used with special syntax $() shown as below:-

Write-Output "Removing old software from directory: $($site.INSTALLDIR)"


In case you want to print the variable name as well, put a backtick before the variable usage. Example:-

Write-Output "Removing old software from directory (`$site.INSTALLDIR): $($site.INSTALLDIR)"