# Bilgim Bilgisayar - RAM Bulucu # Bu script hiçbir şey kurmaz, hiçbir dosya değiştirmez. Sadece donanım bilgisini (WMI) okur ve # sonuçları bilgimbilgisayar.com/ram-bulucu sayfasında açar. Gönderilen veri: sistem modeli, # anakart, işlemci, RAM slot/modül bilgisi, ekran kartı ve disk modeli. Kişisel dosya okunmaz. # Log: %TEMP%\RamBulucu.log & { $SITE = 'https://www.bilgimbilgisayar.com' $LOG = Join-Path $env:TEMP 'RamBulucu.log' $script:hatalar = @() try { [Console]::OutputEncoding = [Text.Encoding]::UTF8 } catch {} try { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 } catch {} function Log($m) { try { Add-Content -Path $LOG -Value ("{0:HH:mm:ss} {1}" -f (Get-Date), $m) -Encoding UTF8 } catch {} } function Hata($adim, $e) { $script:hatalar += "${adim}: $e"; Log "HATA [$adim] $e" } function Oku($cls) { $r = @() try { $r = @(Get-CimInstance -ClassName $cls -ErrorAction Stop) } catch { Log "CIM $cls olmadı ($($_.Exception.Message)), WMI deneniyor" try { $r = @(Get-WmiObject -Class $cls -ErrorAction Stop) } catch { Hata "WMI $cls" $_.Exception.Message } } Log "$cls : $($r.Count) kayıt" $r } function Tm($s) { if ($null -eq $s) { '' } else { ("$s").Trim() -replace '\s+', ' ' } } try { Set-Content -Path $LOG -Value "RAM Bulucu log - $(Get-Date -Format 'dd.MM.yyyy HH:mm:ss')" -Encoding UTF8 } catch {} $os = $null; try { $os = Get-WmiObject Win32_OperatingSystem -ErrorAction Stop } catch {} Log "PowerShell $($PSVersionTable.PSVersion) | $($os.Caption) $($os.Version) $($os.OSArchitecture) | Dil modu: $($ExecutionContext.SessionState.LanguageMode) | .NET CLR $($PSVersionTable.CLRVersion)" Write-Host '' Write-Host ' Bilgim Bilgisayar - RAM Bulucu' -ForegroundColor Yellow Write-Host ' Donanım bilgisi okunuyor...' -ForegroundColor Gray $url = $null try { if ($ExecutionContext.SessionState.LanguageMode -ne 'FullLanguage') { Hata 'Dil modu' "$($ExecutionContext.SessionState.LanguageMode) - güvenlik politikası/antivirüs PowerShell'i kısıtlıyor" } $cs = Oku Win32_ComputerSystem | Select-Object -First 1 $bb = Oku Win32_BaseBoard | Select-Object -First 1 $bios = Oku Win32_BIOS | Select-Object -First 1 $cpu = Oku Win32_Processor | Select-Object -First 1 $encl = Oku Win32_SystemEnclosure | Select-Object -First 1 $arr = Oku Win32_PhysicalMemoryArray | Where-Object { $_.Use -eq 3 -or $null -eq $_.Use } $mods = @(Oku Win32_PhysicalMemory) if ($mods.Count -eq 0) { Hata 'RAM' 'Win32_PhysicalMemory boş döndü (sanal makine veya bozuk WMI olabilir)' } $TipAd = @{ 20='DDR'; 21='DDR2'; 24='DDR3'; 26='DDR4'; 27='LPDDR'; 28='LPDDR2'; 29='LPDDR3'; 30='LPDDR4'; 34='DDR5'; 35='LPDDR5' } $slot = [int](($arr | Measure-Object -Property MemoryDevices -Sum).Sum) $maxKB = ($arr | ForEach-Object { if ($_.MaxCapacityEx -gt 0) { [double]$_.MaxCapacityEx } else { [double]$_.MaxCapacity } } | Measure-Object -Sum).Sum if ($slot -lt $mods.Count) { $slot = $mods.Count } $kasa = [int](@($encl.ChassisTypes) | Select-Object -First 1) $notebook = (@(8,9,10,11,12,14,18,21,30,31,32) -contains $kasa) -or ($cs.PCSystemType -eq 2) $tipKod = 0 foreach ($m in $mods) { if ($m.SMBIOSMemoryType -gt 0) { $tipKod = [int]$m.SMBIOSMemoryType; break } } if ($tipKod -eq 0) { foreach ($m in $mods) { if ($m.MemoryType -gt 0) { $tipKod = [int]$m.MemoryType; break } } } $hiz = [int](($mods | Measure-Object -Property Speed -Maximum).Maximum) $tip = $TipAd[$tipKod] if (-not $tip) { $tip = if ($hiz -ge 4400) { 'DDR5' } elseif ($hiz -ge 2133) { 'DDR4' } elseif ($hiz -ge 800) { 'DDR3' } else { '' } } $formKod = 0 foreach ($m in $mods) { if ($m.FormFactor -gt 0) { $formKod = [int]$m.FormFactor; break } } $form = if ($formKod -eq 12) { 'notebook' } elseif ($formKod -eq 8) { 'pc' } elseif ($notebook) { 'notebook' } else { 'pc' } Log "Kasa=$kasa PCSystemType=$($cs.PCSystemType) slot=$slot maxKB=$maxKB tipKod=$tipKod tip=$tip formKod=$formKod form=$form hiz=$hiz" if (-not $tip) { Hata 'RAM tipi' 'DDR tipi tespit edilemedi' } # Diskler (boyut ondalık GB = ürün adlarındaki gibi): Get-PhysicalDisk (Win8+) SSD/HDD ve NVMe/SATA ayrımını verir; yoksa Win32_DiskDrive'dan tahmin $diskler = @() try { $diskler = @(Get-PhysicalDisk -ErrorAction Stop | ForEach-Object { $mt = "$($_.MediaType)"; $bt = "$($_.BusType)"; $md = Tm $_.FriendlyName if ($mt -notin 'SSD','HDD') { $mt = if ($bt -eq 'NVMe' -or $md -match 'SSD|NVMe') { 'SSD' } else { '?' } } [ordered]@{ model = $md; gb = [int][math]::Round($_.Size / 1e9); tur = $mt; bus = $bt } }) Log "Get-PhysicalDisk: $($diskler.Count) disk" } catch { Log "Get-PhysicalDisk olmadı ($($_.Exception.Message)), Win32_DiskDrive kullanılıyor" $diskler = @(Oku Win32_DiskDrive | ForEach-Object { $md = Tm $_.Model $bt = if ($_.InterfaceType -eq 'USB') { 'USB' } elseif ($md -match 'NVMe|PCIe|SN\d{3}') { 'NVMe' } else { 'SATA' } [ordered]@{ model = $md; gb = [int][math]::Round($_.Size / 1e9); tur = $(if ($md -match 'SSD|NVMe') { 'SSD' } else { '?' }); bus = $bt } }) } foreach ($dk in $diskler) { Log "Disk: $($dk.model) $($dk.gb)GB $($dk.tur) $($dk.bus)" } # Yazıcılar: sanal olanlar (PDF/XPS/Fax/OneNote) elenir; marka/model ayıklaması sayfada yapılır $yazicilar = @(Oku Win32_Printer | Where-Object { $_.PortName -notmatch '^(PORTPROMPT:|nul:|SHRFAX:|FILE:)' -and "$($_.Name) $($_.DriverName)" -notmatch 'OneNote|PDF|XPS|Fax|Faks|AnyDesk|Send To' } | Select-Object -First 6 | ForEach-Object { [ordered]@{ ad = (Tm $_.Name).Substring(0, [math]::Min(80, (Tm $_.Name).Length)); surucu = Tm $_.DriverName; ag = [bool]($_.Network -or $_.PortName -match '^(WSD|IP_|\\\\)') } }) foreach ($y in $yazicilar) { Log "Yazıcı: $($y.ad) | $($y.surucu)" } $cSur = $null try { $cSur = Get-WmiObject Win32_LogicalDisk -Filter "DeviceID='C:'" -ErrorAction Stop } catch { Hata 'C: sürücüsü' $_.Exception.Message } $veri = [ordered]@{ v = 1 sys = [ordered]@{ uretici = Tm $cs.Manufacturer; model = Tm $cs.Model; notebook = [bool]$notebook anakart = (Tm "$($bb.Manufacturer) $($bb.Product)"); anakartRev = Tm $bb.Version bios = Tm $bios.SMBIOSBIOSVersion; cpu = Tm $cpu.Name } ram = [ordered]@{ slot = $slot; maxGB = $(if ($maxKB -gt 0) { [int][math]::Round($maxKB / 1MB) } else { 0 }) tip = $tip; form = $form; hiz = $hiz calisan = [int](($mods | Measure-Object -Property ConfiguredClockSpeed -Maximum).Maximum) moduller = @($mods | ForEach-Object { [ordered]@{ yer = Tm $_.DeviceLocator; gb = [int][math]::Round($_.Capacity / 1GB); uretici = Tm $_.Manufacturer; parca = Tm $_.PartNumber; hiz = [int]$_.Speed } }) } gpu = @(Oku Win32_VideoController | ForEach-Object { Tm $_.Name } | Where-Object { $_ } | Select-Object -First 3) disk = @($diskler | Select-Object -First 4 | ForEach-Object { "$($_.model) ($($_.gb) GB)" }) diskler = @($diskler | Select-Object -First 6) yazicilar = $yazicilar c = $(if ($cSur) { [ordered]@{ gb = [int][math]::Round($cSur.Size / 1e9); bosGB = [int][math]::Round($cSur.FreeSpace / 1e9) } } else { $null }) } Write-Host '' Write-Host (" Sistem : {0} {1}" -f $veri.sys.uretici, $veri.sys.model) Write-Host (" Anakart : {0}" -f $veri.sys.anakart) Write-Host (" İşlemci : {0}" -f $veri.sys.cpu) Write-Host (" RAM : {0} slot, {1} dolu - {2} {3} {4} MHz" -f $slot, $mods.Count, $tip, $(if ($form -eq 'notebook') { 'SODIMM (Notebook)' } else { 'DIMM (Masaüstü)' }), $hiz) foreach ($m in $veri.ram.moduller) { Write-Host (" {0}: {1} GB {2} {3}" -f $m.yer, $m.gb, $m.uretici, $m.parca) -ForegroundColor Gray } foreach ($dk in $diskler) { Write-Host (" Disk : {0} ({1} GB, {2} {3})" -f $dk.model, $dk.gb, $dk.tur, $dk.bus) } foreach ($y in $yazicilar) { Write-Host (" Yazıcı : {0}" -f $y.ad) } $json = $veri | ConvertTo-Json -Depth 5 -Compress Log "JSON: $json" $b64 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($json)).TrimEnd('=').Replace('+', '-').Replace('/', '_') $url = "$SITE/ram-bulucu?d=$b64" Log "URL uzunluğu: $($url.Length)" } catch { Hata 'Genel' "$($_.Exception.Message) (satır $($_.InvocationInfo.ScriptLineNumber))" } if ($url) { Write-Host '' Write-Host ' Uygun ürünler tarayıcıda açılıyor...' -ForegroundColor Green try { Start-Process $url -ErrorAction Stop; Log 'Tarayıcı açıldı' } catch { Hata 'Tarayıcı' $_.Exception.Message try { Set-Clipboard -Value $url; Write-Host ' Adres panoya kopyalandı, tarayıcıya yapıştırın.' -ForegroundColor Yellow } catch {} } Write-Host " Açılmazsa bu adresi tarayıcıya yapıştırın:" -ForegroundColor Gray Write-Host " $url" -ForegroundColor DarkGray } Write-Host '' if ($script:hatalar.Count -gt 0) { Write-Host ' Bazı bilgiler okunamadı:' -ForegroundColor Red $script:hatalar | ForEach-Object { Write-Host " - $_" -ForegroundColor Red } Write-Host " Log dosyası: $LOG" -ForegroundColor Yellow Write-Host ' Destek için bu dosyayı bize gönderebilirsiniz: 0264 777 11 88' -ForegroundColor Yellow try { Read-Host ' Kapatmak için Enter''a basın' | Out-Null } catch {} } else { Log 'Tamamlandı, hata yok' Write-Host " Log: $LOG" -ForegroundColor DarkGray Start-Sleep -Seconds 4 } } # RAMBULUCU-SON (ram.php bu satırı görmezse dosyayı yarım sayar; silmeyin, en sonda kalsın)