# ============================================================================== # AHMET GUZEL - PC SERVIS & DONANIM TESHIS ARACI (Fastfetch / CLI v3.0) # ============================================================================== # Kullanim: # irm servis.ahmetguzel.site | iex # ============================================================================== param( [string]$Contact = "", [string]$Note = "", [switch]$Quiet, [string]$Server = "https://servis.ahmetguzel.site" ) $ErrorActionPreference = "SilentlyContinue" [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 Clear-Host Write-Host "" Write-Host " _ _ _ __ __ _____ _____ ____ _____ ______ _____ ____ " -ForegroundColor Cyan Write-Host " / \ | | | | \/ | ____|_ _| / ___|| ____| _ \ \ / /_ _/ ___| " -ForegroundColor Cyan Write-Host " / _ \ | |_| | |\/| | _| | | \___ \| _| | |_) \ \ / / | |\___ \ " -ForegroundColor Blue Write-Host " / ___ \| _ | | | | |___ | | ___) | |___| _ < \ V / | | ___) |" -ForegroundColor Blue Write-Host "/_/ \_\_| |_|_| |_|_____| |_| |____/|_____|_| \_\ \_/ |___|____/ " -ForegroundColor Cyan Write-Host "────────────────────────────────────────────────────────────────────────" -ForegroundColor DarkGray Write-Host " [*] Sistem donanımı ve sağlık durumu taranıyor, lütfen bekleyin..." -ForegroundColor Yellow # 0. Admin Yetkisi Kontrolü $isAdmin = $false try { $currentIdentity = [Security.Principal.WindowsIdentity]::GetCurrent() $currentPrincipal = [Security.Principal.WindowsPrincipal]$currentIdentity $isAdmin = $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) } catch { $isAdmin = $false } # 1. Bilgisayar & Anakart & BIOS $cs = Get-CimInstance Win32_ComputerSystem $bb = Get-CimInstance Win32_BaseBoard $bios = Get-CimInstance Win32_BIOS $biosDate = "" if ($bios.ReleaseDate) { try { if ($bios.ReleaseDate -is [System.DateTime]) { $biosDate = $bios.ReleaseDate.ToString("yyyy-MM-dd") } else { $biosDate = (Get-Date $bios.ReleaseDate -Format "yyyy-MM-dd") } } catch { $biosDate = $bios.ReleaseDate.ToString() } } # 2. İşlemci (CPU) $cpu = Get-CimInstance Win32_Processor $cpuName = if ($cpu) { ($cpu[0].Name -replace '\s+', ' ').Trim() } else { "Bilinmiyor" } $cpuCores = if ($cpu) { "$($cpu[0].NumberOfCores)C / $($cpu[0].NumberOfLogicalProcessors)T" } else { "" } # 3. Bellek (RAM) $ramModules = Get-CimInstance Win32_PhysicalMemory $totalRamGB = [math]::Round(($ramModules | Measure-Object -Property Capacity -Sum).Sum / 1GB) $ramSpeed = if ($ramModules) { ($ramModules | Select-Object -ExpandProperty ConfiguredClockSpeed -First 1) } else { 0 } $ramSlotsArray = Get-CimInstance Win32_PhysicalMemoryArray $totalSlots = if ($ramSlotsArray) { ($ramSlotsArray | Select-Object -ExpandProperty MemoryDevices -First 1) } else { 0 } $usedSlots = if ($ramModules) { $ramModules.Count } else { 0 } # 4. Ekran Kartı (GPU) $gpus = Get-CimInstance Win32_VideoController | Where-Object { $_.PNPDeviceID -like 'PCI*' -or ($_.Name -notlike "*Basic*" -and $_.Name -notlike "*Virtual*") } $gpuList = @() if ($gpus) { foreach ($g in $gpus) { $drvDate = "" if ($g.DriverDate) { try { if ($g.DriverDate -is [System.DateTime]) { $drvDate = $g.DriverDate.ToString("yyyy-MM-dd") } else { $drvDate = [System.Management.ManagementDateTimeConverter]::ToDateTime($g.DriverDate).ToString("yyyy-MM-dd") } } catch {} } $gpuList += [PSCustomObject]@{ Model = $g.Name SurucuSurumu = $g.DriverVersion SurucuTarihi = $drvDate } } } else { $gpuList += [PSCustomObject]@{ Model = "Standart Grafik Bağdaştırıcısı" SurucuSurumu = "" SurucuTarihi = "" } } # 5. Depolama & Diskler (NVMe / SSD / SMART Sağlık) $diskList = @() $physicalDisks = Get-PhysicalDisk if ($physicalDisks) { foreach ($d in $physicalDisks) { $sizeGB = [math]::Round($d.Size / 1GB) $busType = if ($d.BusType) { $d.BusType.ToString() } else { "" } $mediaType = if ($busType -match "NVMe") { "NVMe SSD" } elseif ($d.MediaType) { $d.MediaType.ToString() } else { "Disk" } $health = if ($d.HealthStatus) { $d.HealthStatus.ToString() } else { "Healthy" } $diskList += [PSCustomObject]@{ Model = $d.FriendlyName BoyutGB = $sizeGB Tip = $mediaType Saglik = $health } } } else { $drives = Get-CimInstance Win32_DiskDrive foreach ($d in $drives) { $sizeGB = [math]::Round($d.Size / 1GB) $diskList += [PSCustomObject]@{ Model = $d.Model BoyutGB = $sizeGB Tip = "Disk" Saglik = "Healthy" } } } # Bölüm Dolulukları (C:, D: vb.) $partitions = @() $logicalDisks = Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3" foreach ($ld in $logicalDisks) { $partitions += [PSCustomObject]@{ Surucu = $ld.DeviceID ToplamGB = [math]::Round($ld.Size / 1GB) BosGB = [math]::Round($ld.FreeSpace / 1GB) } } # 6. Ağ Kartları $netAdapters = @() $adapters = Get-NetAdapter | Where-Object { -not $_.Virtual } foreach ($na in $adapters) { $netAdapters += [PSCustomObject]@{ Ad = $na.Name Model = $na.InterfaceDescription Durum = $na.Status Hiz = $na.LinkSpeed } } # 7. İşletim Sistemi $os = Get-CimInstance Win32_OperatingSystem $osCaption = $os.Caption $osBuild = $os.BuildNumber $osArch = $os.OSArchitecture # 8. Güvenlik (Secure Boot & TPM) $secureBoot = $false try { $sbReg = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecureBoot\State' -ErrorAction SilentlyContinue).UEFISecureBootEnabled if ($sbReg -eq 1) { $secureBoot = $true } } catch { $secureBoot = $false } $tpmActive = $false try { $tpmDevice = Get-CimInstance Win32_PnPEntity | Where-Object { $_.Service -eq 'TPM' -or $_.DeviceID -like 'ACPI\MSFT0101*' -or $_.Name -like '*Trusted Platform Module*' } if ($tpmDevice) { $tpmActive = $true } } catch { $tpmActive = $false } # 9. Windows Lisansı & OEM Anahtarı $oemKeyFound = $false try { $oemKey = (Get-CimInstance -Query 'SELECT OA3xOriginalProductKey FROM SoftwareLicensingService' -ErrorAction SilentlyContinue).OA3xOriginalProductKey if ($oemKey -and $oemKey.Trim().Length -gt 5) { $oemKeyFound = $true } } catch {} $licenseStatus = "Bilinmiyor" $licenseChannel = "Bilinmiyor" try { $lic = Get-CimInstance SoftwareLicensingProduct -Filter "PartialProductKey IS NOT NULL and Name like 'Windows%'" | Select-Object -First 1 if ($lic) { $licenseStatus = if ($lic.LicenseStatus -eq 1) { "Lisanslı" } else { "Lisanssız" } if ($lic.Description -match "OEM") { $licenseChannel = "OEM" } elseif ($lic.Description -match "RETAIL") { $licenseChannel = "Retail" } elseif ($lic.Description -match "VOLUME") { $licenseChannel = "KMS / Volume" } } } catch {} # 10. Batarya (Laptop Kontrolü) $batteryInfo = $null $battery = Get-CimInstance Win32_Battery if ($battery) { $estCharge = $battery.EstimatedChargeRemaining $batteryInfo = [PSCustomObject]@{ MevcutYuzde = "$estCharge%" Durum = if ($battery.BatteryStatus -eq 2) { "Şarjda" } else { "Pilde" } } } # Rapor Objesi $report = [PSCustomObject]@{ Cihaz = [PSCustomObject]@{ Marka = $cs.Manufacturer Model = $cs.Model Anakart = "$($bb.Manufacturer) $($bb.Product)" IsLaptop = if ($battery) { $true } else { $false } IsAdmin = $isAdmin } BIOS = [PSCustomObject]@{ Surum = $bios.SMBIOSBIOSVersion Tarih = $biosDate } Islemci = [PSCustomObject]@{ Model = $cpuName Cekirdek = $cpuCores } Bellek = [PSCustomObject]@{ ToplamGB = $totalRamGB HizMHz = $ramSpeed DoluSlot = $usedSlots ToplamSlot = $totalSlots } EkranKartlari = $gpuList Diskler = $diskList Bolumler = $partitions AgKartlari = $netAdapters Sistem = [PSCustomObject]@{ Windows = "$osCaption ($osArch)" Build = $osBuild SecureBoot = $secureBoot TPM = $tpmActive Lisans = $licenseStatus LisansKanal = $licenseChannel OemKeyVarMi = $oemKeyFound } Batarya = $batteryInfo Zaman = (Get-Date).ToString("yyyy-MM-dd HH:mm:ss") } # --- Fastfetch Tarzı Terminal Özeti --- Write-Host "" Write-Host " [✓] Donanım Taraması Tamamlandı!" -ForegroundColor Green Write-Host " ────────────────────────────────────────────────────────────────────────" -ForegroundColor DarkGray Write-Host " 🖥️ Cihaz : " -NoNewline -ForegroundColor Cyan; Write-Host "$($report.Cihaz.Marka) $($report.Cihaz.Model) ($(if ($report.Cihaz.IsLaptop) {'Laptop'} else {'Masaüstü'}))" Write-Host " 🔌 Anakart : " -NoNewline -ForegroundColor Cyan; Write-Host "$($report.Cihaz.Anakart) (BIOS: $($report.BIOS.Surum))" Write-Host " ⚡ İşlemci : " -NoNewline -ForegroundColor Cyan; Write-Host "$($report.Islemci.Model) [$($report.Islemci.Cekirdek)]" Write-Host " 🧠 Bellek : " -NoNewline -ForegroundColor Cyan; Write-Host "$($report.Bellek.ToplamGB) GB RAM ($($report.Bellek.HizMHz) MHz, $($report.Bellek.DoluSlot)/$($report.Bellek.ToplamSlot) Slot Dolu)" Write-Host " 🎮 Ekran Kartı : " -NoNewline -ForegroundColor Cyan; Write-Host "$(($report.EkranKartlari | ForEach-Object { $_.Model }) -join ' + ')" Write-Host " 💾 Depolama : " -NoNewline -ForegroundColor Cyan; Write-Host "$(($report.Diskler | ForEach-Object { "$($_.Model) ($($_.BoyutGB) GB $($_.Tip) - $($_.Saglik))" }) -join ' | ')" Write-Host " 📊 Bölümler : " -NoNewline -ForegroundColor Cyan; Write-Host "$(($report.Bolumler | ForEach-Object { "$($_.Surucu) [$([math]::Round($_.ToplamGB - $_.BosGB))/$($_.ToplamGB) GB Dolu]" }) -join ' | ')" Write-Host " 🪟 İşletim Sis.: " -NoNewline -ForegroundColor Cyan; Write-Host "$($report.Sistem.Windows) (Build $($report.Sistem.Build))" Write-Host " 📜 Lisans : " -NoNewline -ForegroundColor Cyan; Write-Host "$($report.Sistem.Lisans) [$($report.Sistem.LisansKanal)] $(if ($report.Sistem.OemKeyVarMi) {'(Anakartta OEM Key Var)'} else {''})" Write-Host " 🛡️ Güvenlik : " -NoNewline -ForegroundColor Cyan; Write-Host "SecureBoot: $(if ($report.Sistem.SecureBoot) {'Aktif'} else {'Kapalı'}) | TPM: $(if ($report.Sistem.TPM) {'Aktif'} else {'Kapalı/Yok'})" Write-Host " ────────────────────────────────────────────────────────────────────────" -ForegroundColor DarkGray Write-Host "" # Panoya JSON Kopyala (Yedek olarak) $jsonText = $report | ConvertTo-Json -Depth 5 -Compress try { Set-Clipboard -Value $jsonText } catch {} # İnteraktif Sorular (Quiet modu değilse) if (-not $Quiet) { if (-not $Contact) { Write-Host " [?] İletişim / İsminiz (Telegram / Telefon / İsim): " -NoNewline -ForegroundColor Yellow $Contact = Read-Host } if (-not $Note) { Write-Host " [?] Notunuz veya Talep Ettiğiniz İşlem (Örn: Format, Bakım): " -NoNewline -ForegroundColor Yellow $Note = Read-Host } } # Cloudflare Worker'a Gönderim $postUrl = "$($Server.TrimEnd('/'))/report" Write-Host "" Write-Host " [*] Rapor Ahmet'e iletiliyor..." -ForegroundColor Cyan $payload = [PSCustomObject]@{ contact = $Contact note = $Note report = $report } | ConvertTo-Json -Depth 6 -Compress try { $response = Invoke-RestMethod -Uri $postUrl -Method Post -ContentType "application/json; charset=utf-8" -Body ([System.Text.Encoding]::UTF8.GetBytes($payload)) -TimeoutSec 15 if ($response.ok) { Write-Host " [✓] BAŞARILI: Donanım raporunuz Ahmet'e iletildi!" -ForegroundColor Green Write-Host " [i] En kısa sürede sizinle iletişime geçilecektir. Bu pencereyi kapatabilirsiniz." -ForegroundColor Gray } else { Write-Host " [!] Sunucu yanıtı: $($response.error)" -ForegroundColor Yellow } } catch { Write-Host " [!] İletim sırasında bir hata oluştu veya sunucuya ulaşılamadı." -ForegroundColor Red Write-Host " [i] Bilgileriniz panonuza (kopyala-yapıştır) kaydedildi. İsterseniz Ahmet'e doğrudan iletebilirsiniz." -ForegroundColor Gray } Write-Host ""