Skip to content

Instantly share code, notes, and snippets.

@ramazansancar
Last active August 31, 2026 20:05
Show Gist options
  • Select an option

  • Save ramazansancar/8a7aa1932a21e63350ef03d6fad6d551 to your computer and use it in GitHub Desktop.

Select an option

Save ramazansancar/8a7aa1932a21e63350ef03d6fad6d551 to your computer and use it in GitHub Desktop.
Windows Cihaz ve Donanım Analiz Raporu Komutu

Cihaz ve Sistem Detay Raporu

Bu gist kaynağı Windows bilgisayarlarda çalışan programlarda müşterilerden gelen hataların neden olduğunu saptamak üzerine oluşturulmuş komut yer almaktadır.

Çalıştırılacak komut:

powershell -ExecutionPolicy Bypass -NoProfile -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192; $wc = New-Object System.Net.WebClient; $wc.Encoding = [System.Text.Encoding]::UTF8; [Console]::OutputEncoding = [System.Text.Encoding]::UTF8; iex ($wc.DownloadString('https://gist.githubusercontent.com/ramazansancar/8a7aa1932a21e63350ef03d6fad6d551/raw/system-check.ps1?' + (Get-Random)))"

Sonuç

Rapor sonucu hem komut istemci arayüzünde hem de mevcut kullanıcının İndirilenler (Downloads) klasöründe txt dosyası (C:\Users\[Username]\Downloads\sistem-raporu.txt) üreterek cihazı hakkında bilgi edinmeyi sağlamaktadır.

# UTF-8 ve Geriye Donuk Konsol Uyumlulugu
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
Clear-Host
$raporZamani = Get-Date
# Zaman Dilimi (Eski .NET 2.0/3.5/4.0 Uyumlu)
$zamanDilimi = try {
$tz = [System.TimeZoneInfo]::Local
"$($tz.DisplayName) [$($tz.Id)]"
} catch {
[System.TimeZone]::CurrentTimeZone.StandardName
}
# PS 2.0+ Uyumlu Liste Olusturma
$raporSatirlari = New-Object System.Collections.Generic.List[string]
function Yazdir ($metin = "", [ConsoleColor]$renk = [ConsoleColor]::White) {
Write-Host $metin -ForegroundColor $renk
$raporSatirlari.Add($metin)
}
Yazdir "==================================================" Cyan
Yazdir " CIHAZ VE SISTEM DETAY RAPORU " Cyan
Yazdir "==================================================" Cyan
Yazdir "Rapor / Islem Saati : $($raporZamani.ToString('dd.MM.yyyy HH:mm:ss'))"
Yazdir "Zaman Dilimi : $zamanDilimi"
# 1. Cihaz Bilgisi
$cs = Get-WmiObject Win32_ComputerSystem -ErrorAction SilentlyContinue
$bios = Get-WmiObject Win32_BIOS -ErrorAction SilentlyContinue
Yazdir "`n[ 1. CIHAZ BILGISI ]" Yellow
Yazdir "Marka / Uretici : $($cs.Manufacturer)"
Yazdir "Model : $($cs.Model)"
Yazdir "Bilgisayar Adi : $($cs.Name)"
Yazdir "Seri Numarasi : $($bios.SerialNumber)"
# 2. Isletim Sistemi ve Mimari (32/64-Bit XP Dahil)
$os = Get-WmiObject Win32_OperatingSystem -ErrorAction SilentlyContinue
$osArch = if ($os.OSArchitecture) {
$os.OSArchitecture
} elseif ($env:PROCESSOR_ARCHITECTURE -match "64" -or $env:PROCESSOR_ARCHITEW6432 -match "64") {
"64-bit"
} else {
"32-bit"
}
$sonBaslatma = "Bilinmiyor"
$uptime = "Bilinmiyor"
if ($os.LastBootUpTime) {
try {
$bootDate = $os.ConvertToDateTime($os.LastBootUpTime)
$sonBaslatma = $bootDate.ToString("dd.MM.yyyy HH:mm:ss")
$fark = $raporZamani - $bootDate
$uptime = "$($fark.Days) gun, $($fark.Hours) saat, $($fark.Minutes) dakika"
} catch {}
}
# Guc Plani ve Pil Durumu
$gucPlani = "Varsayilan / Belirlenemedi"
try {
$pPlan = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerPlan -Filter "IsActive=true" -ErrorAction SilentlyContinue
if ($pPlan.ElementName) { $gucPlani = $pPlan.ElementName }
} catch {}
$battery = Get-WmiObject Win32_Battery -ErrorAction SilentlyContinue
$pilDurumu = if ($battery) {
$durum = switch ($battery.BatteryStatus) { 1 { "Pilde Calisiyor (Desarj)" } 2 { "Prize Takili (AC Gucunde)" } 3 { "Tam Dolu" } Default { "Prize Takili" } }
"$durum (%$($battery.EstimatedChargeRemaining))"
} else { "Masaustu Cihaz (Prize Bagli)" }
Yazdir "`n[ 2. ISLETIM SISTEMI VE GUC ]" Yellow
Yazdir "Isletim Sistemi : $($os.Caption) ($osArch)"
Yazdir "Surum / Build : $($os.Version) (Build: $($os.BuildNumber))"
Yazdir "Son Baslatma : $sonBaslatma"
Yazdir "Acik Kalma Suresi : $uptime"
Yazdir "Guc Kaynagi / Pil : $pilDurumu"
Yazdir "Aktif Guc Plani : $gucPlani"
# 3. Gelistirici & Runtime Bilgileri
$isAdmin = $false
try {
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
} catch {}
$adminStr = if ($isAdmin) { "Evet (Administrator)" } else { "Hayir (Standart Kullanici)" }
$culture = [System.Globalization.CultureInfo]::CurrentCulture.Name
$uiCulture = [System.Globalization.CultureInfo]::CurrentUICulture.Name
# DirectX Surumu
$dxVer = "DirectX 9"
if (Test-Path "$env:windir\System32\d3d12.dll") { $dxVer = "DirectX 12 (D3D12)" }
elseif (Test-Path "$env:windir\System32\d3d11.dll") { $dxVer = "DirectX 11 (D3D11)" }
elseif (Test-Path "$env:windir\System32\d3d10.dll") { $dxVer = "DirectX 10 (D3D10)" }
# GPU Zamanlama (HAGS)
$hagsVal = (Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" -ErrorAction SilentlyContinue).HwSchMode
$hagsStr = switch ($hagsVal) { 2 { "Acik (Enabled)" } 1 { "Kapali (Disabled)" } Default { "Desteklenmiyor / Kapali" } }
# .NET Framework (4.x)
$netRelease = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" -ErrorAction SilentlyContinue).Release
$netVer = switch ($netRelease) {
{$_ -ge 533320} { "4.8.1 veya ustu ($netRelease)"; break }
{$_ -ge 528040} { "4.8 ($netRelease)"; break }
{$_ -ge 461808} { "4.7.2 ($netRelease)"; break }
{$_ -ge 461308} { "4.7.1 ($netRelease)"; break }
{$_ -ge 460798} { "4.7 ($netRelease)"; break }
{$_ -ge 394802} { "4.6.2 ($netRelease)"; break }
Default { if ($netRelease) { "Release: $netRelease" } else { "4.0 alti veya Yuklu Degil" } }
}
# Modern .NET Desktop Core (6, 7, 8, 9)
$dotNetCorePath = "$env:ProgramFiles\dotnet\shared\Microsoft.WindowsDesktop.App"
$dotNetCores = if (Test-Path $dotNetCorePath) { (Get-ChildItem $dotNetCorePath | Where-Object { $_.PSIsContainer } | Select-Object -ExpandProperty Name) -join ", " } else { "Bulunamadi" }
# Visual C++ 2015-2022
$vcX64 = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" -ErrorAction SilentlyContinue).Version
if (-not $vcX64) { $vcX64 = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x86" -ErrorAction SilentlyContinue).Version }
$vcStr = if ($vcX64) { "Yuklu ($vcX64)" } else { "Yok / Eski" }
# Edge WebView2
$wv2 = (Get-ItemProperty "HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-9D47-44E9-9297-3296F2C24002}" -ErrorAction SilentlyContinue).pv
if (-not $wv2) { $wv2 = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-9D47-44E9-9297-3296F2C24002}" -ErrorAction SilentlyContinue).pv }
if (-not $wv2) { $wv2 = (Get-ItemProperty "HKCU:\Software\Microsoft\EdgeUpdate\Clients\{F3017226-9D47-44E9-9297-3296F2C24002}" -ErrorAction SilentlyContinue).pv }
$wv2Str = if ($wv2) { "$wv2 (Yuklu)" } else { "Bulunamadi / Yuklu Degil" }
Yazdir "`n[ 3. GELISTIRICI / RUNTIME BILGILERI ]" Yellow
Yazdir "Sistem Dili/Bolge : $culture (UI: $uiCulture)"
Yazdir "Yonetici Yetkisi : $adminStr"
Yazdir "DirectX API Surumu : $dxVer"
Yazdir "GPU Zamanlama (HAGS): $hagsStr"
Yazdir ".NET Framework : $netVer"
Yazdir ".NET Desktop Core : $dotNetCores"
Yazdir "Visual C++ Runtimes : $vcStr"
Yazdir "WebView2 Runtime : $wv2Str"
# 4. Guvenlik ve Ag
Yazdir "`n[ 4. GUVENLIK VE AG ]" Yellow
$avList = try { Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct -ErrorAction SilentlyContinue | Select-Object -ExpandProperty displayName } catch {}
if (-not $avList) {
$avList = try { Get-WmiObject -Namespace root\SecurityCenter -Class AntiVirusProduct -ErrorAction SilentlyContinue | Select-Object -ExpandProperty displayName } catch {}
}
$avStr = if ($avList) { ($avList -join ", ") } else { "Windows Defender veya Belirlenemedi" }
Yazdir "Antivirus Yazilimi : $avStr"
$proxySettings = Get-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -ErrorAction SilentlyContinue
if ($proxySettings.ProxyEnable -eq 1) {
Yazdir "Sistem Proxy : AKTIF -> $($proxySettings.ProxyServer)"
} else {
Yazdir "Sistem Proxy : Kapali (Dogrudan Baglanti)"
}
# 5. Islemci ve RAM (32-Bit / 64-Bit)
$cpu = Get-WmiObject Win32_Processor -ErrorAction SilentlyContinue | Select-Object -First 1
$ramModules = Get-WmiObject Win32_PhysicalMemory -ErrorAction SilentlyContinue
$fizikselRamBayt = ($ramModules | Measure-Object -Property Capacity -Sum).Sum
$fizikselRamGB = if ($fizikselRamBayt) { [math]::Round($fizikselRamBayt / 1GB, 0) } else { [math]::Round($os.TotalVisibleMemorySize / 1MB, 0) }
$ramModulSayisi = if ($ramModules) { $ramModules.Count } else { 1 }
$totalVisibleRam = [math]::Round($os.TotalVisibleMemorySize / 1MB, 2)
$freeRam = [math]::Round($os.FreePhysicalMemory / 1MB, 2)
$usedRam = [math]::Round($totalVisibleRam - $freeRam, 2)
$ramPercent = if ($totalVisibleRam -gt 0) { [math]::Round(($usedRam / $totalVisibleRam) * 100, 1) } else { 0 }
$cpuCores = if ($cpu.NumberOfCores) { $cpu.NumberOfCores } else { 1 }
$cpuThreads = if ($cpu.NumberOfLogicalProcessors) { $cpu.NumberOfLogicalProcessors } else { $cpuCores }
Yazdir "`n[ 5. ISLEMCI VE RAM ]" Yellow
Yazdir "Islemci (CPU) : $($cpu.Name.Trim()) ($cpuCores C / $cpuThreads T)"
Yazdir "Takili Fiziksel RAM : $fizikselRamGB GB ($ramModulSayisi Modul Slotu)"
Yazdir "RAM Kullanimi : Toplam: $totalVisibleRam GB | Kullanilan: $usedRam GB (%$ramPercent) | Bos: $freeRam GB"
# 6. Ekran Kartlari ve Cozunurluk (Hatasiz Tarih & 64-Bit VRAM)
Yazdir "`n[ 6. EKRAN VE GORUNTU AYARLARI ]" Yellow
$gpuRegistry = Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\00*" -ErrorAction SilentlyContinue
Get-WmiObject Win32_VideoController -ErrorAction SilentlyContinue | ForEach-Object {
if ($_.CurrentHorizontalResolution) {
$gpuName = $_.Name
# Hata vermeyen dogrudan metin dilimleme ile tarih donusumu
$surucuTarihi = "Bilinmiyor"
if ($_.DriverDate) {
$dStr = $_.DriverDate.ToString()
if ($dStr.Length -ge 8 -and $dStr.Substring(0,8) -match '^\d{8}$') {
$surucuTarihi = "$($dStr.Substring(6,2)).$($dStr.Substring(4,2)).$($dStr.Substring(0,4))"
}
}
# 64-bit Registry'den gercek VRAM boyutu (32-bit WMI 4GB sinirini asmak icin)
$matchedReg = $gpuRegistry | Where-Object { $_.DriverDesc -eq $gpuName } | Select-Object -First 1
$gercekVramBayt = 0
if ($matchedReg -and $matchedReg.'HardwareInformation.qwMemorySize') {
$gercekVramBayt = [int64]$matchedReg.'HardwareInformation.qwMemorySize'
} elseif ($_.AdapterRAM) {
$gercekVramBayt = [int64]$_.AdapterRAM
}
$vram = if ($gercekVramBayt -gt 0) {
$gb = [math]::Round($gercekVramBayt / 1GB, 2)
if ($gb -ge 1) { "$([math]::Round($gb)) GB" } else { "$([math]::Round($gercekVramBayt / 1MB)) MB" }
} else { "Dinamik / Paylasimli" }
Yazdir "Ekran Karti : $gpuName"
Yazdir "VRAM (Bellek) : $vram"
Yazdir "Surucu Surum/Tarih : $($_.DriverVersion) ($surucuTarihi)"
Yazdir "Aktif Cozunurluk : $($_.CurrentHorizontalResolution) x $($_.CurrentVerticalResolution) @ $($_.CurrentRefreshRate)Hz"
Yazdir "---"
}
}
# Windows Genel DPI
$dpi = (Get-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name LogPixels -ErrorAction SilentlyContinue).LogPixels
if (-not $dpi) { $dpi = (Get-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name AppliedDPI -ErrorAction SilentlyContinue).AppliedDPI }
$scale = if ($dpi) { [math]::Round(($dpi / 96) * 100) } else { 100 }
Yazdir "Windows Ana Olcegi : %$scale (DPI: $(if($dpi){$dpi}else{96}))"
# 7. Depolama Alani
Yazdir "`n[ 7. DEPOLAMA ALANI ]" Yellow
Get-WmiObject Win32_LogicalDisk -Filter "DriveType=3" -ErrorAction SilentlyContinue | ForEach-Object {
$diskTotal = [math]::Round($_.Size / 1GB, 1)
$diskFree = [math]::Round($_.FreeSpace / 1GB, 1)
$diskUsed = [math]::Round($diskTotal - $diskFree, 1)
Yazdir "Surucu $($_.DeviceID) : Toplam: $diskTotal GB | Dolu: $diskUsed GB | Bos: $diskFree GB"
}
# 8. Son Uygulama Cokmeleri
Yazdir "`n[ 8. SON UYGULAMA COKMELERI ]" Yellow
try {
$crashes = Get-EventLog -LogName Application -EntryType Error -Source "Application Error" -Newest 3 -ErrorAction SilentlyContinue
if ($crashes) {
foreach ($c in $crashes) {
$msg = $c.Message
$faultingApp = ($msg | Select-String "Hatalı uygulama adı:\s*([^\r\n,]+)|Faulting application name:\s*([^\r\n,]+)" -ErrorAction SilentlyContinue).Matches.Groups[1].Value
$faultingMod = ($msg | Select-String "Hatalı modül adı:\s*([^\r\n,]+)|Faulting module name:\s*([^\r\n,]+)" -ErrorAction SilentlyContinue).Matches.Groups[1].Value
if ($faultingApp) {
Yazdir "$($c.TimeGenerated.ToString('dd.MM.yyyy HH:mm')) -> Coken: $faultingApp | Modul: $faultingMod"
} else {
$hataSatiri = ($msg -split "`n")[0]
Yazdir "$($c.TimeGenerated.ToString('dd.MM.yyyy HH:mm')) -> $hataSatiri"
}
}
} else {
Yazdir "Kayitli uygulama cokmesi (Application Error) bulunamadi."
}
} catch {
Yazdir "Olay gunlugu okunamadi."
}
Yazdir "`n==================================================" Cyan
# --- INDIRILENLER VEYA MASAUSTU KLASORUNE KAYDETME ---
$hedefKlasor = [Environment]::GetFolderPath("Desktop")
if (Test-Path "$env:USERPROFILE\Downloads") {
$hedefKlasor = "$env:USERPROFILE\Downloads"
}
$dosyaYolu = Join-Path $hedefKlasor "sistem-raporu.txt"
try {
$raporSatirlari | Out-File -FilePath $dosyaYolu -Encoding utf8 -Force
Write-Host "`n[OK] Rapor basariyla kaydedildi:" -ForegroundColor Green
Write-Host " $dosyaYolu`n" -ForegroundColor White
# Dosya Gezgini'ni acip dosyayi mavi ile secili hale getirir
explorer.exe /select,"$dosyaYolu"
} catch {
Write-Host "`n[UYARI] Rapor dosya olarak kaydedilemedi: $($_.Exception.Message)" -ForegroundColor Red
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment