I am attempting to retrieve the FreeSpace for a specific drive using Get-WmiObject.
Using Get-WmiObject Win32_logicaldisk on my machine returns the following:
PS C:\Users\Julian\Desktop\Tools\Powershell> Get-WmiObject Win32_logicaldisk | Select-Object DeviceID, FreeSpace
DeviceID FreeSpace
-------- ---------
C: 47114498048
S: 9963356160
Z: 985061974016
I want to specifically request the FreeSpace dependent on the drive letter (DeviceID) I specify however I'm unsure how to do so as I'm rather new to powershell. Any help would be appreciated.