Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3" | Select DeviceID, Size, FreeSpace
Before we dive into syntax, let's address the elephant in the command line. is officially deprecated. wmic help new
wmic process get name
To create a new instance of a WMI class, follow these steps: FreeSpace Before we dive into syntax