使用Windows PowerShell来查看硬件信息 |
您所在的位置:网站首页 › windows查看电脑配置信息 › 使用Windows PowerShell来查看硬件信息 |
早上,研究了下WINDOWS下的PowerShell。 觉得还不错。 下面讲下,使用PowerShell来查看硬件信息: 1. 查看计算机BIOS信息我们首先来检查一下计算机的BIOS信息,BIOS就是基本输入输出系统,是在操作系统运行之前,对计算机进行检查设置的第一个软件。BIOS信息主要就是BIOS的类型、版本等,你可以使用如下命令来查看本地计算机上的Bios信息: PS C:\> Get-WmiObject -Class Win32_BIOSSMBIOSBIOSVersion : 080015Manufacturer : American Megatrends Inc.Name : RS780D BIOS Date: 02/27/09 11:03:04 Ver: 08.00.15SerialNumber : To Be Filled By O.E.M.Version : 022709 - 20090227 这里你可以看到,生产商是American Megatrends,版本是022709 - 20090227的。2. 查看计算机内存信息内存信息往往是我们需要关注的地方,如何能够知道计算机的内存信息?您可以使用如下的命令:PS C:\> Get-WmiObject -Class Win32_PhysicalMemory__GENUS : 2__CLASS : Win32_PhysicalMemory__SUPERCLASS : CIM_PhysicalMemory__DYNASTY : CIM_ManagedSystemElement__RELPATH : Win32_PhysicalMemory.Tag="Physical Memory 0"__PROPERTY_COUNT : 30__DERIVATION : {CIM_PhysicalMemory, CIM_Chip, CIM_PhysicalComponent, CIM_PhysicalElement...}__SERVER : HUBING__NAMESPACE : root\cimv2__PATH : \\HUBING\root\cimv2:Win32_PhysicalMemory.Tag="Physical Memory 0"BankLabel : BANK0Capacity : 2147483648Caption : Physical MemoryCreationClassName : Win32_PhysicalMemoryDataWidth : 72Description : Physical MemoryDeviceLocator : DIMM0FormFactor : 8HotSwappable :InstallDate :InterleaveDataDepth : 0InterleavePosition : 0Manufacturer : Manufacturer00MemoryType : 21Model :Name : Physical MemoryOtherIdentifyingInfo :PartNumber : ModulePartNumber00PositionInRow : 1PoweredOn :Removable :Replaceable :SerialNumber : SerNum00SKU :Speed : 400Status :Tag : Physical Memory 0TotalWidth : 64TypeDetail : 128Version : __GENUS : 2__CLASS : Win32_PhysicalMemory__SUPERCLASS : CIM_PhysicalMemory__DYNASTY : CIM_ManagedSystemElement__RELPATH : Win32_PhysicalMemory.Tag="Physical Memory 1"__PROPERTY_COUNT : 30__DERIVATION : {CIM_PhysicalMemory, CIM_Chip, CIM_PhysicalComponent, CIM_PhysicalElement...}__SERVER : HUBING__NAMESPACE : root\cimv2__PATH : \\HUBING\root\cimv2:Win32_PhysicalMemory.Tag="Physical Memory 1"BankLabel : BANK1Capacity : 2147483648Caption : Physical MemoryCreationClassName : Win32_PhysicalMemoryDataWidth : 72Description : Physical MemoryDeviceLocator : DIMM1FormFactor : 8HotSwappable :InstallDate :InterleaveDataDepth : 0InterleavePosition : 0Manufacturer : Manufacturer01MemoryType : 21Model :Name : Physical MemoryOtherIdentifyingInfo :PartNumber : ModulePartNumber01PositionInRow : 1PoweredOn :Removable :Replaceable :SerialNumber : SerNum01SKU :Speed : 400Status :Tag : Physical Memory 1TotalWidth : 64TypeDetail : 128Version : 由于我使用的电脑有2根内存条. 当你看到内存容量是XXXXXXXXXX时候,是不是有点头痛呢?让我们再来简单编写一个脚本,计算计算机上的内存容量。代码如下:PS C:\> Get-WmiObject -Class Win32_PhysicalMemory | %{$sum = 0} { $sum += $_.Capacity } {Write-Host ($sum / 1MB) "MB"}4096 MB 原来计算机上有4GB的内存啊,真的是很方便。3. 查看计算机处理器信息很多时候,我们很好奇计算机上的处理器信息,例如:CPU的速度、时钟频率、缓存大小、CPU型号、CPU数量等。我们只要使用下面的命令就能了解计算机上的CPU信息啦:PS C:\> Get-WmiObject -Class Win32_Processor__GENUS : 2__CLASS : Win32_Processor__SUPERCLASS : CIM_Processor__DYNASTY : CIM_ManagedSystemElement__RELPATH : Win32_Processor.DeviceID="CPU0"__PROPERTY_COUNT : 48__DERIVATION : {CIM_Processor, CIM_LogicalDevice, CIM_LogicalElement, CIM_ManagedSystemElement}__SERVER : HUBING__NAMESPACE : root\cimv2__PATH : \\HUBING\root\cimv2:Win32_Processor.DeviceID="CPU0"AddressWidth : 32Architecture : 9Availability : 3Caption : x64 Family 16 Model 2 Stepping 3ConfigManagerErrorCode :ConfigManagerUserConfig :CpuStatus : 1CreationClassName : Win32_ProcessorCurrentClockSpeed : 2300CurrentVoltage : 15DataWidth : 64Description : x64 Family 16 Model 2 Stepping 3DeviceID : CPU0ErrorCleared :ErrorDescription :ExtClock : 200Family : 231InstallDate :L2CacheSize : 1536L2CacheSpeed :L3CacheSize : 2048L3CacheSpeed : 0LastErrorCode :Level : 16LoadPercentage : 46Manufacturer : AuthenticAMDMaxClockSpeed : 2300Name : AMD Phenom(tm) 8650 Triple-Core ProcessorNumberOfCores : 3NumberOfLogicalProcessors : 3OtherFamilyDescription :PNPDeviceID :PowerManagementCapabilities :PowerManagementSupported : FalseProcessorId : 178BFBFF00100F23ProcessorType : 3Revision : 515Role : CPUSocketDesignation : CPU 1Status : OKStatusInfo : 3Stepping : 3SystemCreationClassName : Win32_ComputerSystemSystemName : HUBINGUniqueId :UpgradeMethod : 1Version : Model 2, Stepping 3VoltageCaps : 这里我做了一些删减,如果有多个CPU,那么每个CPU的这些信息都会被输出,确定CPU的数量也很容易,用下面的命令就能实现:PS C:\> @(Get-WmiObject -Class Win32_Processor).count1 4. 查看计算机显卡信息PS C:\> Get-WmiObject -Class Win32_VideoController__GENUS : 2__CLASS : Win32_VideoController__SUPERCLASS : CIM_PCVideoController__DYNASTY : CIM_ManagedSystemElement__RELPATH : Win32_VideoController.DeviceID="VideoController1"__PROPERTY_COUNT : 59__DERIVATION : {CIM_PCVideoController, CIM_VideoController, CIM_Controller, CIM_LogicalDevice...}__SERVER : HUBING__NAMESPACE : root\cimv2__PATH : \\HUBING\root\cimv2:Win32_VideoController.DeviceID="VideoController1"AcceleratorCapabilities :AdapterCompatibility : ATI Technologies Inc.AdapterDACType : Internal DAC(400MHz)AdapterRAM : 268435456Availability : 3CapabilityDescriptions :Caption : ATI Radeon HD 3300 GraphicsColorTableEntries :ConfigManagerErrorCode : 0ConfigManagerUserConfig : FalseCreationClassName : Win32_VideoControllerCurrentBitsPerPixel : 32CurrentHorizontalResolution : 1024CurrentNumberOfColors : 4294967296CurrentNumberOfColumns : 0CurrentNumberOfRows : 0CurrentRefreshRate : 75CurrentScanMode : 4CurrentVerticalResolution : 768Description : ATI Radeon HD 3300 GraphicsDeviceID : VideoController1DeviceSpecificPens :DitherType : 0DriverDate : 20090316213354.000000-000DriverVersion : 8.01.01.888ErrorCleared :ErrorDescription :ICMIntent :ICMMethod :InfFilename : oem1.infInfSection : ati2mtag_RS780DInstallDate :InstalledDisplayDrivers : atiumdag.dll,atidxx32.dll,atidxx64,atiumdva.cap,atiumd64,atiumd6a,atitmm64LastErrorCode :MaxMemorySupported :MaxNumberControlled :MaxRefreshRate : 75MinRefreshRate : 56Monochrome : FalseName : ATI Radeon HD 3300 GraphicsNumberOfColorPlanes :NumberOfVideoPages :PNPDeviceID : PCI\VEN_1002&DEV_9614&SUBSYS_00001002&REV_00\4&456635&0&2808PowerManagementCapabilities :PowerManagementSupported :ProtocolSupported :ReservedSystemPaletteEntries :SpecificationVersion :Status : OKStatusInfo :SystemCreationClassName : Win32_ComputerSystemSystemName : HUBINGSystemPaletteEntries :TimeOfLastReset :VideoArchitecture : 5VideoMemoryType : 2VideoMode :VideoModeDescription : 1024 x 768 x 4294967296 colorsVideoProcessor : ATI Radeon HD 3300 Graphics (0x9614) 5. 查看计算机硬盘信息在检查硬件信息的最后,我们来看看计算机的硬盘信息。PS C:\> Get-WmiObject -Class Win32_DiskDrivePartitions : 4DeviceID : \\.\PHYSICALDRIVE0Model : WDC WD6401AALS-00L3B2 ATA DeviceSize : 640132416000Caption : WDC WD6401AALS-00L3B2 ATA Device Partitions代码分区的数量,Size表示磁盘的容量,一块小硬盘,嘿嘿。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8183550/viewspace-691289/,如需转载,请注明出处,否则将追究法律责任。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |