一键生成酷炫系统报告-脚本版
引言
作为一名技术爱好者或IT专业人士,你是否经常需要查看电脑的硬件信息?无论是排查问题、升级硬件还是单纯想了解自己的设备配置,传统的系统信息查看方式总是显得那么单调乏味。今天,我要向大家介绍一款专为POPEYELXW打造的酷炫硬件信息收集工具,它将彻底改变你查看系统信息的方式!
工具特色
🎨 个性化视觉体验
-
专属ASCII艺术标题:大写的POPEYELXW以精美的ASCII艺术形式呈现
-
彩色控制台输出:不同信息模块使用不同颜色,视觉效果出众
-
动态加载动画:实时显示收集进度,告别枯燥等待
-
专业边框设计:每个信息模块都有精美的边框装饰
📊 全面的硬件信息
-
系统概览:操作系统版本、安装日期、启动时间等
-
CPU详情:处理器型号、核心数、频率架构
-
内存分析:总容量、插槽使用情况、各模块详细信息
-
存储设备:硬盘型号、容量、接口类型、序列号
-
显卡信息:显卡型号、显存大小、驱动版本
-
网络适配器:网络设备名称、MAC地址
使用方法
简单三步即可使用:
-
保存脚本
# 酷炫版硬件信息收集脚本 - 修正版 # 保存为 get_system_info.ps1 # 设置控制台颜色和编码 $Host.UI.RawUI.WindowTitle = " POPEYELXW 硬件信息收集工具 " $Host.UI.RawUI.ForegroundColor = "White" # 酷炫的ASCII艺术标题 function Show-AsciiTitle { Write-Host "" Write-Host "╔══════════════════════════════════════════════════════════════════════════════╗" -ForegroundColor Cyan Write-Host "║ ║" -ForegroundColor Cyan Write-Host "║ ██████╗ ██████╗ ██████╗ ███████╗██╗ ██╗███████╗██╗ ██╗ ██╗ ║" -ForegroundColor Yellow Write-Host "║ ██╔══██╗██╔═══██╗██╔══██╗██╔════╝╚██╗ ██╔╝██╔════╝██║ ██║ ██║ ║" -ForegroundColor Yellow Write-Host "║ ██████╔╝██║ ██║██████╔╝█████╗ ╚████╔╝ █████╗ ██║ ██║ █╗ ██║ ║" -ForegroundColor Yellow Write-Host "║ ██╔═══╝ ██║ ██║██╔═══╝ ██╔══╝ ╚██╔╝ ██╔══╝ ██║ ██║███╗██║ ║" -ForegroundColor Yellow Write-Host "║ ██║ ╚██████╔╝██║ ███████╗ ██║ ███████╗███████╗╚███╔███╔╝ ║" -ForegroundColor Yellow Write-Host "║ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝╚══════╝ ╚══╝╚══╝ ║" -ForegroundColor Yellow Write-Host "║ ║" -ForegroundColor Cyan Write-Host "╠══════════════════════════════════════════════════════════════════════════════╣" -ForegroundColor Cyan Write-Host "║ ║" -ForegroundColor Green Write-Host "║ 系统硬件信息收集工具 ║" -ForegroundColor Green Write-Host "║ ║" -ForegroundColor Green Write-Host "║ 专属用户: POPEYELXW ║" -ForegroundColor Green Write-Host "╚══════════════════════════════════════════════════════════════════════════════╝" -ForegroundColor Cyan Write-Host "" } # 显示加载动画 - 修正版 function Show-LoadingAnimation { param([string]$Message, [int]$Seconds = 2) $chars = @('', '', '', '', '', '', '', '') $startTime = Get-Date # 修正的while循环 while (((Get-Date) - $startTime).TotalSeconds -lt $Seconds) { foreach ($char in $chars) { Write-Host "`r$Message $char" -NoNewline -ForegroundColor Green Start-Sleep -Milliseconds 100 } } Write-Host "`r$Message " -ForegroundColor Green } # 获取系统信息 function Get-SystemInfo { Write-Host "`n 收集系统信息..." -ForegroundColor Magenta Show-LoadingAnimation -Message "正在获取系统详情" -Seconds 1 $os = Get-WmiObject -Class Win32_OperatingSystem $computer = Get-WmiObject -Class Win32_ComputerSystem $systemInfo = @" ╔══════════════════════════════════════════════════════════════════════════════╗ ║ 系统信息 ╠══════════════════════════════════════════════════════════════════════════════╣ ║ 系统名称: $($os.Caption) ║ 系统版本: $($os.Version) ║ 系统架构: $($os.OSArchitecture) ║ 安装日期: $(($os.ConvertToDateTime($os.InstallDate)).ToString("yyyy-MM-dd HH:mm:ss")) ║ 最后启动: $(($os.ConvertToDateTime($os.LastBootUpTime)).ToString("yyyy-MM-dd HH:mm:ss")) ║ 计算机名: $($computer.Name) ║ 制造商 : $($computer.Manufacturer) ║ 型号 : $($computer.Model) ║ 当前用户: $env:USERNAME ╚══════════════════════════════════════════════════════════════════════════════╝ "@ return $systemInfo } # 获取CPU信息 function Get-CPUInfo { Write-Host "`n 收集CPU信息..." -ForegroundColor Magenta Show-LoadingAnimation -Message "正在分析处理器" -Seconds 1 $cpu = Get-WmiObject -Class Win32_Processor $cpuInfo = @" ╔══════════════════════════════════════════════════════════════════════════════╗ ║ CPU信息 ╠══════════════════════════════════════════════════════════════════════════════╣ ║ 处理器: $($cpu.Name) ║ 核心数: $($cpu.NumberOfCores) 物理核心 | $($cpu.NumberOfLogicalProcessors) 逻辑核心 ║ 最大频率: $([math]::Round($cpu.MaxClockSpeed/1000, 2)) GHz ║ 架构: $($cpu.AddressWidth) 位 ║ 制造商: $($cpu.Manufacturer) ╚══════════════════════════════════════════════════════════════════════════════╝ "@ return $cpuInfo } # 获取内存信息 function Get-MemoryInfo { Write-Host "`n 收集内存信息..." -ForegroundColor Magenta Show-LoadingAnimation -Message "正在检测内存模块" -Seconds 1 $memory = Get-WmiObject -Class Win32_PhysicalMemory $totalMemory = ($memory | Measure-Object -Property Capacity -Sum).Sum / 1GB $memorySlots = "" $i = 1 foreach ($mem in $memory) { $sizeGB = [math]::Round($mem.Capacity / 1GB, 2) $memorySlots += "║ 插槽 $i : $sizeGB GB | $($mem.Speed) MHz | $($mem.Manufacturer)`n" $i++ } $memoryInfo = @" ╔══════════════════════════════════════════════════════════════════════════════╗ ║ 内存信息 ╠══════════════════════════════════════════════════════════════════════════════╣ ║ 总内存: $([math]::Round($totalMemory, 2)) GB ║ 内存插槽使用: $($memory.Count) / $((Get-WmiObject -Class Win32_PhysicalMemoryArray).MemoryDevices) $memorySlots╚══════════════════════════════════════════════════════════════════════════════╝ "@ return $memoryInfo } # 获取磁盘信息 function Get-DiskInfo { Write-Host "`n 收集磁盘信息..." -ForegroundColor Magenta Show-LoadingAnimation -Message "正在扫描存储设备" -Seconds 2 $disks = Get-WmiObject -Class Win32_DiskDrive $diskInfo = "╔══════════════════════════════════════════════════════════════════════════════╗`n" $diskInfo += "║ 磁盘信息 `n" $diskInfo += "╠══════════════════════════════════════════════════════════════════════════════╣`n" foreach ($disk in $disks) { $sizeGB = [math]::Round($disk.Size / 1GB, 2) $diskInfo += "║ 型号: $($disk.Model)`n" $diskInfo += "║ 大小: $sizeGB GB | 接口: $($disk.InterfaceType)`n" $diskInfo += "║ 序列号: $($disk.SerialNumber)`n" $diskInfo += "║ ------------------------------------------------------------------------ `n" } $diskInfo += "╚══════════════════════════════════════════════════════════════════════════════╝" return $diskInfo } # 获取显卡信息 function Get-GraphicsInfo { Write-Host "`n 收集显卡信息..." -ForegroundColor Magenta Show-LoadingAnimation -Message "正在识别图形设备" -Seconds 1 $gpus = Get-WmiObject -Class Win32_VideoController $gpuInfo = "╔══════════════════════════════════════════════════════════════════════════════╗`n" $gpuInfo += "║ 显卡信息 `n" $gpuInfo += "╠══════════════════════════════════════════════════════════════════════════════╣`n" foreach ($gpu in $gpus) { if ($gpu.Name -notlike "*Remote*" -and $gpu.Name -notlike "*Microsoft*") { $vram = if ($gpu.AdapterRAM -gt 1GB) { "$([math]::Round($gpu.AdapterRAM/1GB, 2)) GB" } else { "$([math]::Round($gpu.AdapterRAM/1MB, 2)) MB" } $gpuInfo += "║ 显卡: $($gpu.Name)`n" $gpuInfo += "║ 显存: $vram | 驱动版本: $($gpu.DriverVersion)`n" $gpuInfo += "║ ------------------------------------------------------------------------ `n" } } $gpuInfo += "╚══════════════════════════════════════════════════════════════════════════════╝" return $gpuInfo } # 获取网络信息 function Get-NetworkInfo { Write-Host "`n 收集网络信息..." -ForegroundColor Magenta Show-LoadingAnimation -Message "正在检查网络适配器" -Seconds 1 $adapters = Get-WmiObject -Class Win32_NetworkAdapter | Where-Object { $_.NetEnabled -eq $true } $networkInfo = "╔══════════════════════════════════════════════════════════════════════════════╗`n" $networkInfo += "║ 网络信息 `n" $networkInfo += "╠══════════════════════════════════════════════════════════════════════════════╣`n" foreach ($adapter in $adapters) { $networkInfo += "║ 适配器: $($adapter.Name)`n" $networkInfo += "║ MAC地址: $($adapter.MACAddress)`n" $networkInfo += "║ ------------------------------------------------------------------------ `n" } $networkInfo += "╚══════════════════════════════════════════════════════════════════════════════╝" return $networkInfo } $mytitle=" _____ ____ _____ ________ ________ _ __ ___ __`n" $mytitle+=" | __ \ / __ \| __ \| ____\ \ / / ____| | \ \ / | \ / /`n" $mytitle+=" | |__) | | | | |__) | |__ \ \_/ /| |__ | | \ V / \ \ /\ / / `n" $mytitle+=" | ___/| | | | ___/| __| \ / | __| | | > < \ \/ \/ / `n" $mytitle+=" | | | |__| | | | |____ | | | |____| |____ / . \ \ /\ / `n" $mytitle+=" |_| \____/|_| |______| |_| |______|______/_/ \_\ \/ \/ `n" # 主程序 Clear-Host Show-AsciiTitle Write-Host "开始收集系统硬件信息..." -ForegroundColor Yellow Write-Host "═══════════════════════════════════════════════════════════════════════════════" -ForegroundColor Gray # 收集所有信息 $allInfo = @() $allInfo += $mytitle $allInfo += Get-SystemInfo $allInfo += Get-CPUInfo $allInfo += Get-MemoryInfo $allInfo += Get-DiskInfo $allInfo += Get-GraphicsInfo $allInfo += Get-NetworkInfo # 保存到文件 $outputFile = "$env:USERPROFILE\Desktop\酷炫硬件信息报告.txt" Write-Host "`n 正在保存报告到桌面..." -ForegroundColor Magenta # 添加进度条 for ($i = 0; $i -le 100; $i += 10) { Write-Progress -Activity "保存硬件信息报告" -Status "正在写入文件..." -PercentComplete $i Start-Sleep -Milliseconds 100 } Write-Progress -Activity "保存硬件信息报告" -Completed $allInfo | Out-File -FilePath $outputFile -Encoding UTF8 # 显示完成信息 Write-Host "" Write-Host " 硬件信息收集完成!" -ForegroundColor Green Write-Host " 报告已保存至: $outputFile" -ForegroundColor Cyan Write-Host "" Write-Host " 感谢使用个人专属硬件信息收集工具!" -ForegroundColor Yellow Write-Host "" # 询问是否打开文件 try { $openFile = Read-Host "是否立即打开报告文件?(Y/N)" if ($openFile -eq 'Y' -or $openFile -eq 'y') { Invoke-Item $outputFile } } catch { Write-Host "无法打开文件,请手动访问: $outputFile" -ForegroundColor Yellow } Write-Host "" Write-Host "按任意键退出..." -ForegroundColor Gray $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") -
运行脚本
# 右键点击文件,选择"使用PowerShell运行" # 或以管理员身份运行PowerShell,然后执行: .\get_system_info.ps1
-
查看报告
-
脚本会自动在桌面生成
POPEYELXW_硬件信息报告.txt -
可选择立即打开报告文件或稍后查看
-
运行要求
-
Windows PowerShell 5.0 或更高版本
-
建议以管理员权限运行,获取更完整的信息
-
无需安装任何额外软件或模块
技术亮点
🛠️ 健壮的错误处理
try {
# 硬件信息收集代码
$cpu = Get-WmiObject -Class Win32_Processor
} catch {
# 优雅的降级处理
Write-Host "部分信息获取失败,但不影响整体报告生成"
}
⏱️ 实时进度反馈
# 动态加载动画
$chars = @('⣾', '⣽', '⣻', '⢿', '⡿', '⣟', '⣯', '⣷')
# 进度条显示
Write-Progress -Activity "保存硬件信息报告" -PercentComplete $i
🎯 个性化定制
工具专为POPEYELXW定制,包括:
-
专属ASCII艺术字(如果有兴趣想改自己的,可以在这个网站生成https://patorjk.com/software/taag/#p=display&f=Avatar&t=Type+Something+&x=none&v=4&h=4&w=80&we=false)
-
个性化欢迎信息
-
定制化文件名
-
专属感谢语
实际应用场景
💼 专业用途
-
IT支持:快速收集客户系统信息,提高故障诊断效率
-
系统管理:批量收集多台设备硬件信息,建立资产清单
-
采购决策:基于现有硬件配置制定升级计划
🎮 个人用途
-
硬件爱好者:详细了解自己的设备配置
-
游戏玩家:评估系统性能,优化游戏体验
-
学习研究:了解计算机硬件组成和工作原理
结语
这款POPEYELXW专属硬件信息收集工具不仅实用性强,更重要的是它让原本枯燥的系统信息收集变得有趣而酷炫。无论你是IT专业人士还是普通用户,这款工具都能为你提供全面、直观的系统硬件信息。
技术不应该只是冰冷的数据,也可以充满艺术和个性!
立即尝试:复制文章中的代码,保存为PS1文件,体验这款专为热爱计算机的发烧友打造的硬件信息收集工具吧!
作者:POPEYE-LXW
转载请注明出处
浙公网安备 33010602011771号