Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

string concatenation issue

$
0
0

$UserLastNameGlobal="James"
$UserFirstNameGlobal="Bond"

Write-Output "Folder $UserLastNameGlobal" + "_" + "$UserFirstNameGlobal already exists"

=Bond already exists

Write-Output "Folder $UserLastNameGlobal_$UserFirstNameGlobal already exists"

=Folder Bond already exists

I need output Folder "James Bond already exists". I tried above 2 different ways and it is not getting what i want. Please help


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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