Link to home
Start Free TrialLog in
Avatar of brittonv
brittonvFlag for United States of America

asked on

Combine Vars in Powershell into new Var

I am trying to combine variables in a script into a single varilabe.

So say My Script has set:
$a =1
$b =hello
$c = World

I want my $result to be "1 hello World"

I tried things like
$result = $a $b $c

So I can just call on $result

Extra credit how do I set the $result to be "1.hello world!"

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of brittonv

ASKER

THANK YOU!!!!
Or more "powershellish" solution:

$result = "$a $b $c"

and

$result = "$a.$b $c"