Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

adding the $ sign to a string

$
0
0

Hello,

I am really struggling to get this to work, I have read several websites and I have tried all sorts of combinations of back ticks, single quotes, double quotes, backslash etc. what I am trying to achieve is get the computer name in a variable as a string, and add the $ sign to the end of it. so if my computer name is PC1 it should end up with PC1$ held in the variable.

this is my latest attempt

$computername = gc env:computername + "'$"

but it doesnt work :( can someone help me?

Thanks

Steve


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>