早上,研究了下WINDOWS下的PowerShell。
觉得还不错。
下面讲下,使用PowerShell来查看硬件信息:
1. 查看计算机BIOS信息
我们首先来检查一下计算机的BIOS信息,BIOS就是基本输入输出系统,是在操作系统运行之前,对计算机进行检查设置的第一个软件。BIOS信息主要就是BIOS的类型、版本等,你可以使用如下命令来查看本地计算机上的Bios信息:
PS C:\> Get-WmiObject -Class Win32_BIOS
SMBIOSBIOSVersion : 080015
Manufacturer : American Megatrends Inc.
Name : RS780D BIOS Date: 02/27/09 11:03:04 Ver: 08.00.15
SerialNumber : 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 : BANK0
Capacity : 2147483648
Caption : Physical Memory
CreationClassName : Win32_PhysicalMemory
DataWidth : 72
Description : Physical Memory
DeviceLocator : DIMM0
FormFactor : 8
HotSwappable :
InstallDate :
InterleaveDataDepth : 0
InterleavePosition : 0
Manufacturer : Manufacturer00
MemoryType : 21
Model :
Name : Physical Memory
OtherIdentifyingInfo :
PartNumber : ModulePartNumber00
PositionInRow : 1
PoweredOn :
Removable :
Replaceable :
SerialNumber : SerNum00
SKU :