need help with powershell "Set-rdm-property"

need help with powershell "Set-rdm-property"

avatar

Ok what I am doing to trying to set the description on my connections. If I do the following command it works
set-rdm-property $session.ID -property Description -Value $connection.Hostname -NoRefresh

But what I want to do is have it set a description that combines the use of a string and the value I am importing. such as "Hostname: Server1". However when I use the following command to do it I get an error "WARNING: Path or property not found. Value not set."

set-rdm-property $session.ID -property Description -Value "Host name: "+$connection.Hostname -NoRefresh

Is there a different way I should be doing this?

All Comments (2)

avatar

Maybe I should have posted this in the powershell repository :/

avatar

Hi Douglas,

You need to add parenthesis:
set-rdm-property $session.ID -property Description -Value ("Host name: "+$connection.Hostname) -NoRefresh

Olivier Désalliers