troubleshooting Question

Changing name of Powershell variables

Avatar of campbell1972
campbell1972 asked on
Powershell
2 Comments2 Solutions97 ViewsLast Modified:
I'm looking for the simplest way in Powershell to uniquely identify a variable that will be subject to numerous loop iterations.

The question is a simple one I hope: How do you (if you even can!) modify the name of a variable once it has been set?

For example, if my variable name is $Test, how could I append a server name to the variable name (i.e. $TestServer)

Any and all help appreciated!

JayZee
ASKER CERTIFIED SOLUTION
Qlemo
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 2 Answers and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros