如何通过 powershell 查找戴尔固件版本

如何通过 powershell 查找戴尔固件版本

看起来我的新服务器对此没有影响:

#Get-WmiObject -Namespace root\CIMV2\Dell -Class Dell_CMApplication -Filter "componentType = 'FRMW'" -ComputerName "localhost" | Select name,version

这将返回:名称空间 root\cimv2\dell 是“无效的”。

那么现在如何通过 powershell 获取固件版本?

答案1

我知道您要求使用 PowerShell,但是......

如果您下载并设置了 OMSA,您可以通过 网页查看固件版本https://<IP address of your server>:1311/。您可以使用右侧的下拉菜单浏览机箱和存储固件版本。

如果您想通过 Linux 服务器上的命令行查看信息,命令omreport(/opt/dell/srvadmin/bin/omreport) 是我找到的解决方案。也许 Windows 中的 PowerShell 也有类似的功能。以下是示例:

# omreport storage controller
List of Controllers in the system

Controller
ID                                            : 0
Status                                        : Non-Critical
Name                                          : PERC H700 Integrated
Slot ID                                       : PCIe Slot 4
State                                         : Degraded
Firmware Version                              : 12.10.4-0001
Minimum Required Firmware Version             : 12.10.7-0001
Driver Version                                : 07.707.51.00-rc1
Minimum Required Driver Version               : Not Applicable
Storport Driver Version                       : Not Applicable
Minimum Required Storport Driver Version      : Not Applicable
Number of Connectors                          : 2
Rebuild Rate                                  : 30%
BGI Rate                                      : 30%
Check Consistency Rate                        : 30%
Reconstruct Rate                              : 30%
Alarm State                                   : Not Applicable
Cluster Mode                                  : Not Applicable
SCSI Initiator ID                             : Not Applicable
Cache Memory Size                             : 512 MB
Patrol Read Mode                              : Auto
Patrol Read State                             : Stopped
Patrol Read Rate                              : 30%
Patrol Read Iterations                        : 346
Abort Check Consistency on Error              : Disabled
Allow Revertible Hot Spare and Replace Member : Enabled
Load Balance                                  : Not Applicable
Auto Replace Member on Predictive Failure     : Disabled
Redundant Path view                           : Not Applicable
CacheCade Capable                             : Not Applicable
Persistent Hot Spare                          : Disabled
Encryption Capable                            : Yes
Encryption Key Present                        : No
Encryption Mode                               : None
Preserved Cache                               : Not Applicable
Spin Down Unconfigured Drives                 : Disabled
Spin Down Hot Spares                          : Disabled
Spin Down Configured Drives                   : Not Applicable
Automatic Disk Power Saving (Idle C)          : Not Applicable
T10 Protection Information Capable            : No
Non-RAID HDD Disk Cache Policy                : Not Applicable

Controller
ID                                            : 1
Status                                        : Non-Critical
Name                                          : 6Gbps SAS HBA
Slot ID                                       : PCIe Slot 1
State                                         : Degraded
Firmware Version                              : 07.03.05.00
Minimum Required Firmware Version             : 07.03.06.00
Driver Version                                : 20.102.00.00
Minimum Required Driver Version               : Not Applicable
Storport Driver Version                       : Not Applicable
Minimum Required Storport Driver Version      : Not Applicable
Number of Connectors                          : 2
Rebuild Rate                                  : Not Applicable
BGI Rate                                      : Not Applicable
Check Consistency Rate                        : Not Applicable
Reconstruct Rate                              : Not Applicable
Alarm State                                   : Not Applicable
Cluster Mode                                  : Not Applicable
SCSI Initiator ID                             : Not Applicable
Cache Memory Size                             : Not Applicable
Patrol Read Mode                              : Not Applicable
Patrol Read State                             : Not Applicable
Patrol Read Rate                              : Not Applicable
Patrol Read Iterations                        : Not Applicable
Abort Check Consistency on Error              : Not Applicable
Allow Revertible Hot Spare and Replace Member : Not Applicable
Load Balance                                  : Not Applicable
Auto Replace Member on Predictive Failure     : Not Applicable
Redundant Path view                           : Not Applicable
CacheCade Capable                             : Not Applicable
Persistent Hot Spare                          : Not Applicable
Encryption Capable                            : Not Applicable
Encryption Key Present                        : Not Applicable
Encryption Mode                               : Not Applicable
Preserved Cache                               : Not Applicable
T10 Protection Information Capable            : Not Applicable
Non-RAID HDD Disk Cache Policy                : Not Applicable

答案2

强制性法律标签:我在戴尔工作。

这显然有点晚了,但这里是如何使用 PowerShell 从 iDRAC 获取固件


param([
    Parameter(Mandatory)]
    [System.Net.IPAddress]$idracIp,
    [Parameter(Mandatory)]
    [pscredential]$credentials
)

$params = @{uri = "https://$($idracIp)/redfish/v1/UpdateService/FirmwareInventory";
                   Method = 'Get';
                   Headers = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($credentials.GetNetworkCredential().username):$($credentials.GetNetworkCredential().password)"));
           }
        }

invoke-restmethod @params -SkipCertificateCheck | Select-Object -ExpandProperty Members

最好使用 x-auth 令牌并始终使用 PSCredentials,但这就是使用基本身份验证的方法。

示例输出

PS C:\Users\grant\Downloads> .\getFirmware.ps1 -idracIp 192.168.1.47

cmdlet getFirmware.ps1 at command pipeline position 1
Supply values for the following parameters:
credentials
User: root
Password for user root: *


@odata.id
---------
/redfish/v1/UpdateService/FirmwareInventory/Current-103999-4.35__RAID.Backplane.Firmware.1      
/redfish/v1/UpdateService/FirmwareInventory/Current-104892-51.16.0-4076__RAID.Integrated.1-1    
/redfish/v1/UpdateService/FirmwareInventory/Current-108255-22.00.6__NIC.Embedded.1-1-1
/redfish/v1/UpdateService/FirmwareInventory/Current-108255-22.00.6__NIC.Embedded.2-1-1
/redfish/v1/UpdateService/FirmwareInventory/Current-159-2.6.6__BIOS.Setup.1-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-0-2.2.0__Disk.Bay.8:Enclosure.Internal.0-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-0-2.2.0__Disk.Bay.9:Enclosure.Internal.0-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-0-VDV1DP25__Disk.Bay.6:Enclosure.Internal.0-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-0-VDV1DP25__Disk.Bay.7:Enclosure.Internal.0-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-101622-00.0C.7D__PSU.Slot.1
/redfish/v1/UpdateService/FirmwareInventory/Installed-101622-00.0C.7D__PSU.Slot.2
/redfish/v1/UpdateService/FirmwareInventory/Installed-103999-4.35__RAID.Backplane.Firmware.1
/redfish/v1/UpdateService/FirmwareInventory/Installed-104684-4.2.0.0__ServiceModule.Embedded.1
/redfish/v1/UpdateService/FirmwareInventory/Installed-104892-51.16.0-4076__RAID.Integrated.1-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-108255-22.00.6__NIC.Embedded.1-1-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-108255-22.00.6__NIC.Embedded.2-1-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-109277-J004__Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-109277-J004__Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-109673-1.3.2.8__TPM.Integrated.1-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-159-2.6.6__BIOS.Setup.1-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-18981-21.10.02__DriverPack.Embedded.1:LC.Embedded.1
/redfish/v1/UpdateService/FirmwareInventory/Installed-25227-5.10.10.00__iDRAC.Embedded.1-1
/redfish/v1/UpdateService/FirmwareInventory/Installed-25806-4301A68__Diagnostics.Embedded.1:LC.Embedded.1
/redfish/v1/UpdateService/FirmwareInventory/Installed-27763-1.0.7__CPLD.Embedded.1
/redfish/v1/UpdateService/FirmwareInventory/Installed-28897-5.10.10.00__USC.Embedded.1:LC.Embedded.1
/redfish/v1/UpdateService/FirmwareInventory/Previous-25227-5.10.10.00__iDRAC.Embedded.1-1

相关内容