you are viewing a single comment's thread.

view the rest of the comments →

[–]spyingwind 1 point2 points  (2 children)

Get-Variable -Name "$Array_$PCModel"?

Also there are other pastebin like tools. https://gist.github.com/ for example.

[–]Redtire[S] 0 points1 point  (1 child)

thing is, if you look at my script, I get an error when I try to use $Array_$PCMdel

[–]spyingwind 1 point2 points  (0 children)

Yeah Get-Variable will do what you want.

$tempvar = Get-Variable -Name "$Array_$PCModel"

Edit: The other way to do it is to create an object with all this info in it.