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

Concatenate a variable

$
0
0

I have the following:

for ($i=0; $i -lt $maxnum) {

$something = (get-wmiobject win32_diskpartition)[$i] |%{$_.StartingOffset}

i++

}

What I would like to do is have the $something actually be $offset$i, where if you called the variable "$offset1" or "offset2" you would get the associated value. I think I have to concatenate and cast but I'm not sure about the syntax.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



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