Загрузка данных


# Способ 1 (через Get-PSDrive)
Get-PSDrive -PSProvider FileSystem | Format-Table Name, Root, Used, Free

# Способ 2 (через WMI — более детально)
Get-WmiObject Win32_LogicalDisk | Select-Object DeviceID, VolumeName, Size, FreeSpace, DriveType, FileSystem

# Способ 3 (через CIM)
Get-CimInstance Win32_LogicalDisk | Format-Table DeviceID, VolumeName, @{Name="Size(GB)";Expression={[math]::Round($_.Size/1GB,2)}}, @{Name="Free(GB)";Expression={[math]::Round($_.FreeSpace/1GB,2)}}