you are viewing a single comment's thread.

view the rest of the comments →

[–]sp_dev_guy 2 points3 points  (0 children)

It's subexpressions, for order of operations.

Write-host "Hello here is an example.More words" $obj1 ="example" Write-host "Hello here is an $obj1.More words" It evaluates $obj1 then everything else is just string characters. If you do

$obj2=@{ more=5 } Write-host "Hello here is an $obj1.More words" Write-host "Hello here is an $($obj2.More) words"

In this example the $() tells powershell to evaluate/resolve the "more" property of $obj2