Powershell 3.0 : Alternative to “Get-Volume”
问题 I'm trying to get various properties for each hdd-volume on the computer. I was using the cmdlet get-volume and then walking through it via foreach , but that cmdlet does not exist in Windows Server 2008. :( Does anybody know an alternative? I just need the drive letter, objectId/guid, free space, total space, and the name of each volume. 回答1: The WMI class Win32_Volume has the information you are looking for Get-WMIObject -Class Win32_Volume | Select DriveLetter,FreeSpace,Capacity,DeviceID