我想让芯片组脱离多台服务器。只测试将获得此信息的主线。
有些服务器有英特尔和其他有AMD - 当我使用下面它确实不起作用 - 它只是发回一切 - 我会选择First 1
所以我只回来一个,但我如何确保脚本只关注英特尔或AMD?
Get-WMIObject win32_pnpentity -ComputerName SERVERNAME| where { $_.caption -like "*AMD*" -or "*Intel*" } | select caption #-First 1
输出我得到:
caption
-------
ACPI Multiprocessor PC
Microsoft ACPI-Compliant System
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
PCI bus
Intel(R) 5520/5500/X58 I/O Hub to ESI Port - 3406
Intel(R) 7500/5520/5500/X58 I/O Hub PCI Express Root Port 1 - 3408
Smart Array P410i Controller
HP Virtual LUN
HP LOGICAL VOLUME SCSI Disk Device
HP LOGICAL VOLUME SCSI Disk Device
HP LOGICAL VOLUME SCSI Disk Device
HP LOGICAL VOLUME SCSI Disk Device
HP LOGICAL VOLUME SCSI Disk Device
HP LOGICAL VOLUME SCSI Disk Device
Intel(R) 7500/5520/5500/X58 I/O Hub PCI Express Root Port 2 - 3409
Intel(R) 7500/5520/5500/X58 I/O Hub PCI Express Root Port 3 - 340A
Intel(R) 7500/5520/X58 I/O Hub PCI Express Root Port 4 - 340B
Intel(R) 7500/5520/X58 I/O Hub PCI Express Root Port 5 - 340C
Intel(R) 7500/5520/X58 I/O Hub PCI Express Root Port 6 - 340D
Intel(R) 7500/5520/5500/X58 I/O Hub PCI Express Root Port 7 - 340E
Intel(R) 7500/5520/5500/X58 I/O Hub PCI Express Root Port 8 - 340F
Intel(R) 7500/5520/5500/X58 I/O Hub PCI Express Root Port 9 - 3410
Intel(R) 7500/5520/5500/X58 I/O Hub PCI Express Root Port 10 - 3411
PCI standard host CPU bridge
PCI standard host CPU bridge
PCI standard host CPU bridge
PCI standard host CPU bridge
Intel(R) 7500/5520/5500/X58 Physical Layer Port 0 - 3418
Intel(R) 7500/5520/5500 Physical Layer Port 1 - 3419
PCI standard host CPU bridge
PCI standard host CPU bridge
PCI standard host CPU bridge
PCI standard host CPU bridge
PCI standard host CPU bridge
PCI standard host CPU bridge
PCI standard host CPU bridge
PCI standard host CPU bridge
PCI standard host CPU bridge
PCI standard PCI-to-PCI bridge
Broadcom BCM5709C NetXtreme II GigE #62
Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #62
Broadcom BCM5709C NetXtreme II GigE #63
Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #63
PCI standard PCI-to-PCI bridge
Broadcom BCM5709C NetXtreme II GigE #103
Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #103
Standard Universal PCI to USB Host Controller
USB Root Hub
答案 0 :(得分:1)
想通了 - 应该是:
Get-WMIObject win32_pnpentity -ComputerName SERVERNAME | where {( $_.caption -like "*AMD*" ) -or ($_.caption -like "*Intel*")} | select caption -First 1
答案 1 :(得分:0)
尝试Win32_BaseBoard
和Win32_Bios
WMI课程。