Reply To: List Windows 10 disk space in GB

  • Topaz George

    Organizer
    9 July 2020 at 12:01 pm
    $disks = Get-WmiObject -Query "Select * from Win32_LogicalDisk where DriveType=3" -ComputerName $env:COMPUTERNAME -Namespace root\cimv2
    $fList = $disks | ForEach-Object {
    New-Object PSObject -Property @{
    'Name' = $_.DeviceID
    'Space in Total (GB)' = $_.Size / 1GB
    'Free Space in GB' = $_.FreeSpace / 1GB
    'Free Space as a %' = 100 * $_.FreeSpace / $_.Size
    }
    }
    $fList|Format-List
    

DCOM hardening issue.

This application fails to authenticate with WMI on the SCCM server because Microsoft has not yet hardened DCOM on their Windows Preinstallation Environment. We are working on a different approach, but it will only be released during the first quarter of 2024. But until that time, the only workaround will be to uninstall the update corresponding to KB5004442.