meixi 当前离线
上等兵
# 硬盘类型 Get-WmiObject -Class Win32_DiskDrive | Select-Object Model, InterfaceType # 内存类型 Get-WmiObject -Class Win32_PhysicalMemory | ForEach-Object { $memoryType = switch ($_.SMBIOSMemoryType) { 20 { "DDR" } 21 { "DDR2" } 22 { "DDR2 FB-DIMM" } 24 { "DDR3" } 26 { "DDR4" } Default { "Unknown" } } [PSCustomObject]@{ Manufacturer = $_.Manufacturer Capacity = ($_.Capacity / 1GB) -as [int] MemoryType = $memoryType } }复制代码
newswan 当前离线
上尉
Get-PhysicalDisk | Format-List复制代码
TOP
Five66 当前离线
aloha20200628 当前离线
(Get-WmiObject -Class Win32_DiskDrive).InterfaceType #或直接调用 wmic 功能 wmic diskdrive get 'interfacetype,model'复制代码
wmic diskdrive get interfacetype,model复制代码
ppll2030 当前离线
四级士官
@echo off&setlocal enabledelayedexpansion for /f "tokens=2 delims= " %%n in ('echo list disk^|diskpart') do set n=%%n for /l %%i in (0,1,%n%) do ( echo.&set l=0 for /f "delims=" %%a in ('^(echo select disk %%i ^&echo detail disk^)^|diskpart') do ( set /a l+=1 if !l! == 7 echo %%a if !l! == 9 echo %%a ) ) pause复制代码