Write-Host "== drives ==" Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3" | ForEach-Object { Write-Host ("{0} free {1}GB / {2}GB" -f $_.DeviceID,[math]::Round($_.FreeSpace/1GB),[math]::Round($_.Size/1GB)) } Write-Host "== Windows.old* on all fixed drives ==" $found=$false Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3" | ForEach-Object { $root="$($_.DeviceID)\" Get-ChildItem $root -Filter "Windows.old*" -Directory -Force -ErrorAction SilentlyContinue | ForEach-Object { $found=$true $sw=Join-Path $_.FullName "Windows\System32\config\SOFTWARE" Write-Host ("FOUND: {0} | SOFTWARE hive exists: {1}" -f $_.FullName,(Test-Path $sw)) } } if(-not $found){Write-Host "none found on any drive"} Write-Host "== Pro digital license probe (dlv all) ==" cscript //nologo "$env:windir\System32\slmgr.vbs" /dlv all 2>&1 | Select-String -Pattern "Name:|Description:|License Status:|Partial Product Key:" | ForEach-Object { $_.Line.Trim() }