As you can see, the following commands provide slightly different output. Why? I was expecting them to be the same. There is a 2.66MB difference between the two.
How can I get the values from "wmic diskdrive get size" in powershell? This is the value I'm needing and it's the one that appears in the MSINFO32 tool.
- wmic diskdrive get size
- (Get-Disk).Size
- (Get-PhysicalDisk).Size
PS C:\Windows\system32> wmic diskdrive get size
Size
858990666240
103079208960
PS C:\Windows\system32> (Get-Disk).Size
858993459200
103079215104
PS C:\Windows\system32> (Get-PhysicalDisk).Size
858993459200
103079215104