How to Get Actual Hard Disk Memory of A VM?
<p>Is it possible to get the actual hard disk usage of a virtual machine?</p>

<pre><code>Measure-VM -Name * | select-object -property TotalDiskAllocation
</code></pre>

<p>The TotalDiskAllocation property gets the total disk space assigned to the VM and even though this is helpful I also need to know how much is really being used. </p>

<p>For example, if a VM has 150 GB of allocated memory and it only uses 50 GB, is there any Powershell command that will be able to extract the 50 GB? If yes, how will I be able to incorporate that script to the script above?</p>