Retrieve Detailed System Specifications PowerShell Script

This PowerShell script collects and displays comprehensive system specifications for a Windows machine, including details about the operating system, processor, memory, disk drives, graphics, network adapters, and motherboard/BIOS. It organizes the information into a clear, readable format, making it ideal for system diagnostics, inventory tracking, or personal reference.

Click to view script…
# Get OS Information
$os = Get-WmiObject -Class Win32_OperatingSystem
$installDate = [System.Management.ManagementDateTimeConverter]::ToDateTime($os.InstallDate)
Write-Output "Operating System Information:"
Write-Output "OS Name: $($os.Caption)"
Write-Output "Version: $($os.Version)"
Write-Output "Build Number: $($os.BuildNumber)"
Write-Output "Installation Date: $installDate"
Write-Output ""

# Get Processor Information
$processors = Get-WmiObject -Class Win32_Processor
$totalCores = ($processors | Measure-Object -Property NumberOfCores -Sum).Sum
$totalThreads = ($processors | Measure-Object -Property NumberOfLogicalProcessors -Sum).Sum
$processorName = $processors[0].Name
$maxClockSpeed = $processors[0].MaxClockSpeed
Write-Output "Processor Information:"
Write-Output "Processor: $processorName"
Write-Output "Total Cores: $totalCores"
Write-Output "Total Threads: $totalThreads"
Write-Output "Max Clock Speed: $maxClockSpeed MHz"
Write-Output ""

# Get Memory Information
$memory = Get-WmiObject -Class Win32_PhysicalMemory
$totalRAM = [math]::Round(($memory | Measure-Object -Property Capacity -Sum).Sum / 1GB, 2)
Write-Output "Memory Information:"
Write-Output "Total RAM: $totalRAM GB"
Write-Output ""

# Get Disk Information
$disks = Get-WmiObject -Class Win32_DiskDrive
Write-Output "Disk Information:"
foreach ($disk in $disks) {
    $sizeGB = [math]::Round($disk.Size / 1GB, 2)
    Write-Output "Disk Model: $($disk.Model)"
    Write-Output "Size: $sizeGB GB"
    Write-Output ""
}

# Get Graphics Information
$gpus = Get-WmiObject -Class Win32_VideoController
Write-Output "Graphics Information:"
foreach ($gpu in $gpus) {
    Write-Output "Graphics Card: $($gpu.Name)"
    Write-Output "Resolution: $($gpu.VideoModeDescription)"
    Write-Output ""
}

# Get Network Information
$adapters = Get-NetAdapter | Where-Object {$_.Status -eq 'Up'}
Write-Output "Network Information:"
foreach ($adapter in $adapters) {
    Write-Output "Adapter Name: $($adapter.Name)"
    Write-Output "MAC Address: $($adapter.MacAddress)"
    $ipAddresses = Get-NetIPAddress -InterfaceIndex $adapter.InterfaceIndex | Where-Object {$_.AddressFamily -eq 'IPv4'}
    Write-Output "IP Addresses:"
    foreach ($ip in $ipAddresses) {
        Write-Output "  $($ip.IPAddress)"
    }
    Write-Output ""
}

# Get Motherboard and BIOS Information
$motherboard = Get-WmiObject -Class Win32_BaseBoard
$bios = Get-WmiObject -Class Win32_BIOS
$biosDate = [System.Management.ManagementDateTimeConverter]::ToDateTime($bios.ReleaseDate)
Write-Output "Motherboard and BIOS Information:"
Write-Output "Motherboard Manufacturer: $($motherboard.Manufacturer)"
Write-Output "Motherboard Model: $($motherboard.Product)"
Write-Output "BIOS Manufacturer: $($bios.Manufacturer)"
Write-Output "BIOS Version: $($bios.Version)"
Write-Output "BIOS Release Date: $biosDate"