Linux & Windows Detailed System Info Reported Scripts
Windows:
# Rapor için dosya yolu ve adı $reportPath = "C:\rapor.html" # Systeminfo komutunun çıktısını metin dosyasına kaydet systeminfo > C:\systeminfo.txt # CPU bilgilerini al $cpuInfo = Get-WmiObject -Class Win32_Processor # RAM bilgilerini al $ramInfo = Get-WmiObject -Class Win32_ComputerSystem # GPU bilgilerini al (NVIDIA GPU'lar için) $gpuInfo = Get-WmiObject -Namespace "Root\CIMv2" -Class Win32_PnPEntity | Where-Object { $_.Name -like "NVIDIA*" } # Harici cihaz bilgilerini al $externalDevices = Get-WmiObject -Class Win32_PnPEntity | Where-Object { $_.ConfigManagerErrorCode -eq 0 } # HTML raporunu oluştur New-Item -ItemType file -Path $reportPath -Force | Out-Null Add-Content -Path $reportPath -Value "<html><head><style>table, th, td {border: 1px solid black;border-collapse: collapse;padding: 5px;}</style></head><body>" Add-Content -Path $reportPath -Value "<h1>Sistem Bilgileri Raporu</h1>" # Sistem bilgilerini tabloya ekle Add-Content -Path $reportPath -Value "<h2>Genel Sistem Bilgileri</h2>" Add-Content -Path $reportPath -Value "<table>" Get-Content -Path C:\systeminfo.txt | ForEach-Object { $line = $_ if ($line -match "^\s*([^:]+):\s+(.*)$") { $property = $Matches[1] $value = $Matches[2] Add-Content -Path $reportPath -Value "<tr><td>$property</td><td>$value</td></tr>" } } Add-Content -Path $reportPath -Value "</table>" # CPU bilgilerini rapora ekle Add-Content -Path $reportPath -Value "<h2>CPU Bilgileri</h2>" Add-Content -Path $reportPath -Value "<table>" Add-Content -Path $reportPath -Value "<tr><td>İşlemci Modeli</td><td>$($cpuInfo.Name)</td></tr>" Add-Content -Path $reportPath -Value "<tr><td>Çekirdek Sayısı</td><td>$($cpuInfo.NumberOfCores)</td></tr>" Add-Content -Path $reportPath -Value "<tr><td>İşlemci Hızı</td><td>$($cpuInfo.MaxClockSpeed) MHz</td></tr>" Add-Content -Path $reportPath -Value "</table>" # RAM bilgilerini rapora ekle Add-Content -Path $reportPath -Value "<h2>RAM Bilgileri</h2>" Add-Content -Path $reportPath -Value "<table>" Add-Content -Path $reportPath -Value "<tr><td>Toplam RAM</td><td>$($ramInfo.TotalPhysicalMemory / 1GB) GB</td></tr>" Add-Content -Path $reportPath -Value "<tr><td>Boş RAM</td><td>$($ramInfo.FreePhysicalMemory / 1MB) MB</td></tr>" Add-Content -Path $reportPath -Value "</table>" # GPU bilgilerini rapora ekle Add-Content -Path $reportPath -Value "<h2>GPU Bilgileri</h2>" Add-Content -Path $reportPath -Value "<table>" foreach ($gpu in $gpuInfo) { Add-Content -Path $reportPath -Value "<tr><td>GPU</td><td>$($gpu.Name)</td></tr>" } Add-Content -Path $reportPath -Value "</table>" # Harici cihaz bilgilerini rapora ekle Add-Content -Path $reportPath -Value "<h2>Harici Cihazlar</h2>" Add-Content -Path $reportPath -Value "<table>" foreach ($device in $externalDevices) { Add-Content -Path $reportPath -Value "<tr><td>Cihaz Adı</td><td>$($device.Name)</td></tr>" Add-Content -Path $reportPath -Value "<tr><td>Sürücü</td><td>$($device.DriverName)</td></tr>" } Add-Content -Path $reportPath -Value "</table>" # Raporu tamamla Add-Content -Path $reportPath -Value "</body></html>"
Linux:
This post is licensed under CC BY 4.0 by the author.