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

Need help getting disk partition offset values

$
0
0

I'm currently having an issue getting the individual values for starting offset for each disk partition. 

For example, using...

get-wmiobject -class win32_diskpartition | select-object -expand startingoffset

...returns...

1048676

105906176

...which are the two values for starting offset for my two disk partitions.

How would I edit the above so that it only returns the first entry (for the first partition)? I've noticed that for the win32_diskpartition class,index holds the value of the partition number. Unfortunately, index is in the same property class as startingoffset, so I'm having trouble finding where I should feed it into the above argument.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



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