用 Get-ComputerInfo 获取系统摘要
把系统、硬件和固件属性收集为一个对象。
运行 Get-ComputerInfo -Property WindowsProductName, CsName,打印所选属性。
01命令
命令
$ Get-ComputerInfo -Property WindowsProductName, CsName, OsHardwareAbstractionLayer02作用说明
Get-ComputerInfo 从多个 WMI 类汇集数十个属性到一个对象,便于资产清单和支持工单。用 -Property 选择属性可让输出聚焦且更快,比逐个查询类更实用。
03风险
!注意: 完整运行因查询大量类而较慢;脚本中务必用 -Property 收窄。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- Get-ComputerInfo依据: Gets consolidated operating system and hardware properties.
最后验证: 2026-10-13 · 分类: 系统与设置