$OutputEncoding = [System.Text.Encoding]::UTF8
$d = Get-PSDrive C
Write-Host ("C Drive Used: " + [math]::Round($d.Used/1GB,2) + " GB")
Write-Host ("C Drive Free: " + [math]::Round($d.Free/1GB,2) + " GB")
Write-Host ("C Drive Total: " + [math]::Round(($d.Used+$d.Free)/1GB,2) + " GB")
Write-Host ""

$userTemp = (Get-ChildItem -Path $env:TEMP -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
Write-Host ("User Temp ($env:TEMP): " + [math]::Round($userTemp/1MB,2) + " MB")

$sysTemp = (Get-ChildItem -Path "C:\Windows\Temp" -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
Write-Host ("System Temp (C:\Windows\Temp): " + [math]::Round($sysTemp/1MB,2) + " MB")

$recycleBinPath = "C:\" + [char]36 + "Recycle.Bin"
$recycle = (Get-ChildItem -Path $recycleBinPath -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
Write-Host ("Recycle Bin: " + [math]::Round($recycle/1MB,2) + " MB")

if (Test-Path "C:\Windows.old") {
    $old = (Get-ChildItem -Path "C:\Windows.old" -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
    Write-Host ("Windows.old: " + [math]::Round($old/1GB,2) + " GB")
} else {
    Write-Host "Windows.old: not found"
}

$downloads = (Get-ChildItem -Path "$env:USERPROFILE\Downloads" -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
Write-Host ("Downloads: " + [math]::Round($downloads/1MB,2) + " MB")

$thumb = (Get-ChildItem -Path "$env:LOCALAPPDATA\Microsoft\Windows\Explorer" -Filter "thumbcache*" -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
Write-Host ("Thumbnail cache: " + [math]::Round($thumb/1MB,2) + " MB")

$inet = (Get-ChildItem -Path "$env:LOCALAPPDATA\Microsoft\Windows\INetCache" -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
Write-Host ("IE/Edge INetCache: " + [math]::Round($inet/1MB,2) + " MB")

$delivery = (Get-ChildItem -Path "C:\Windows\SoftwareDistribution\DeliveryOptimization" -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
Write-Host ("Delivery Optimization: " + [math]::Round($delivery/1MB,2) + " MB")

$prefetch = (Get-ChildItem -Path "C:\Windows\Prefetch" -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
Write-Host ("Prefetch: " + [math]::Round($prefetch/1MB,2) + " MB")

$wer = (Get-ChildItem -Path "$env:ProgramData\Microsoft\Windows\WER" -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
Write-Host ("Error Reports (WER): " + [math]::Round($wer/1MB,2) + " MB")

$logFiles = (Get-ChildItem -Path "C:\Windows\Logs" -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum
Write-Host ("Windows Logs: " + [math]::Round($logFiles/1MB,2) + " MB")
