<#
.SYNOPSIS
Obtiene información detallada del hardware del sistema
.DESCRIPTION
Muestra los componentes principales del ordenador: CPU, RAM, GPU, Discos, etc.
#>
Write-Host "`n=== INFORMACIÓN DEL SISTEMA ===`n" -ForegroundColor Cyan
## 1. Información del Sistema Operativo
$os = Get-CimInstance Win32_OperatingSystem
Write-Host "`n[SO] $($os.Caption) (Build $($os.BuildNumber))`n" -ForegroundColor Yellow
## 2. Procesador (CPU)
$cpu = Get-CimInstance Win32_Processor
Write-Host "[CPU] $($cpu.Name)" -ForegroundColor Green
Write-Host " - Núcleos: $($cpu.NumberOfCores) físicos, $($cpu.NumberOfLogicalProcessors) lógicos"
Write-Host " - Velocidad: $([math]::Round($cpu.MaxClockSpeed/1000,2)) GHz"
Write-Host " - Socket: $($cpu.SocketDesignation)`n"
## 3. Memoria RAM
$ram = Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum
$totalRAM = [math]::Round($ram.Sum/1GB, 2)
Write-Host "[RAM] Total: $totalRAM GB" -ForegroundColor Green
Get-CimInstance Win32_PhysicalMemory | ForEach-Object {
$speed = if ($_.Speed -gt 0) { "$($_.Speed) MHz" } else { "Desconocido" }
Write-Host " - Slot $($_.DeviceLocator): $([math]::Round($_.Capacity/1GB, 2)) GB ($speed)"
}
Write-Host ""
## 4. Tarjeta Gráfica (GPU)
Write-Host "[GPU]" -ForegroundColor Green
Get-CimInstance Win32_VideoController | Where-Object { $_.Name -notlike "*Microsoft*" } | ForEach-Object {
Write-Host " - $($_.Name)"
Write-Host " VRAM: $([math]::Round($_.AdapterRAM/1GB, 2)) GB (Reportado)"
Write-Host " Resolución actual: $($_.CurrentHorizontalResolution)x$($_.CurrentVerticalResolution)`n"
}
## 5. Almacenamiento
Write-Host "[ALMACENAMIENTO]" -ForegroundColor Green
Get-Disk | ForEach-Object {
$disk = $_
$partitions = Get-Partition -DiskNumber $disk.Number
$sizeGB = [math]::Round($disk.Size/1GB, 2)
Write-Host " - Disco $($disk.Number): $($disk.Model) ($sizeGB GB, $($disk.BusType))"
$partitions | ForEach-Object {
$size = [math]::Round($_.Size/1GB, 2)
$free = [math]::Round(($_.Size - $_.UsedSize)/1GB, 2)
Write-Host " - Partición $($_.DriveLetter): $size GB ($free GB libres) [Sistema: $($_.IsSystem)]"
}
Write-Host ""
}
## 6. Placa Base
$mb = Get-CimInstance Win32_BaseBoard
Write-Host "[PLACA BASE]" -ForegroundColor Green
Write-Host " - Fabricante: $($mb.Manufacturer)"
Write-Host " - Modelo: $($mb.Product)"
Write-Host " - Versión: $($mb.Version)`n"
## 7. Red
Write-Host "[RED]" -ForegroundColor Green
Get-NetAdapter | Where-Object { $_.Status -eq "Up" } | ForEach-Object {
$ip = (Get-NetIPAddress -InterfaceIndex $_.ifIndex -AddressFamily IPv4).IPAddress
Write-Host " - $($_.Name): $($_.InterfaceDescription)"
Write-Host " MAC: $($_.MacAddress), IPv4: $ip"
Write-Host " Velocidad: $($_.LinkSpeed)`n"
}
## 8. BIOS
$bios = Get-CimInstance Win32_BIOS
Write-Host "[BIOS]" -ForegroundColor Green
Write-Host " - Fabricante: $($bios.Manufacturer)"
Write-Host " - Versión: $($bios.SMBIOSBIOSVersion)"
Write-Host " - Fecha: $($bios.ReleaseDate.ToString('yyyy-MM-dd'))`n"
Write-Host "`n=== FIN DEL REPORTE ===`n" -ForegroundColor Cyan