Add-content one line

add-Content -path “D:$appPoolName\file.htm” -Value ("$appPoolName"," $IPAddress")

both variables are strings .

I want to add both of them to file.htm in the same line .

for example : site1 10.20.10.5

 

 

Remove the comma from the `-Value` and use both variables in one set of “”.

Add-Content -Path "D:\$appPoolName\file.htm" -Value "$appPoolName $IPAddress"

pwshliquori

10x pwshliquori