It seems like this would be a no brainer but I have to admit defeat.
$sIPAddress='192.168.1.152'
write-host '"HostName"="'$sIPAddress'"'
outputs
"HostName"=" 192.168.1.152"
I can't have the leading space. I tried $($sIPAddress) to no avail.
Bonus question, how do I select a plain text editor or a code block.
Thanks, sorry for all the blank lines...