07-21-2023, 01:21 PM
Try wrapping whatever you want to print out in parentheses:
Write-Host ($assoc.Id + " - " + $assoc.Name + " - " + $assoc.Owner)
Your code is being interpreted as many parameters being passed to [`Write-Host`][1]. Wrapping it up inside parentheses will concatenate the values and then pass the resulting value as a single parameter.
[1]:
Write-Host ($assoc.Id + " - " + $assoc.Name + " - " + $assoc.Owner)
Your code is being interpreted as many parameters being passed to [`Write-Host`][1]. Wrapping it up inside parentheses will concatenate the values and then pass the resulting value as a single parameter.
[1]:
[To see links please register here]