ProLiant Servers (ML,DL,SL)
1841709 Members
3223 Online
110185 Solutions
New Discussion

Re: Cannot Read Network Adapter

 
DQ07
Occasional Visitor

Cannot Read Network Adapter

I am working on a ProLiant DL380 Gen11, Firmware 1.57 using HPEilocmdlets 4.3.0.0 and Powershell version 5.1.  When I run the command Get-HpeiloNicInfo I only receive output for the EthernetInterface.  the NetworkAdapter output is blank.  I need to retrieve the MAC address for the network adapter.

$nic = Get-hpeiloNICInfo -conneciton $iloconnection2024-03-28_08-19-43Nic.jpg

4 REPLIES 4
GM_M
HPE Pro

Re: Cannot Read Network Adapter

Hi DQ07 ,

Could you please try to use the following command Get-NetAdapter in powershell to retrieve Network Adapter.

Thanks and Regards,
Manoj



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
TVVJ
HPE Pro

Re: Cannot Read Network Adapter

Hello,

You may refer to "RESTful Interface Tool User Guide" and see if it helps.

Regards,



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[All opinions expressed here are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Greeshma21
HPE Pro

Re: Cannot Read Network Adapter

Hi @DQ07 

You can use this command getmac /v to retrieve the MAC address for the network adapter.
It is also possible to determine the MAC address of a NIC with the ipconfig /all command.

Regards,
Greeshma


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
DSteff
Visitor

Re: Cannot Read Network Adapter

Hi @DQ07 ,

with the cmdlet "Get-hpeiloNICInfo," there are occasional issues with retrieving the MAC address. Please try using "ilorest.exe" in PowerShell as follows (or manually with ilorest):
$iloRestExe = 'C:\Program Files\Hewlett Packard Enterprise\RESTful Interface Tool\ilorest.exe'
$r = & "$iloRestExe" list Name "PhysicalPorts/MacAddress" --selector=NetworkAdapter --url $iloIP --logout -u $iloAdministrator -p $ilopassword -j
$r = $r | select -skip 1 | select -skiplast 2 | ConvertFrom-Json
$mac = $r.PhysicalPorts[0].MacAddress -replace(":","")

Certainly, you can also try it like this:
$sharedNic = Get-HPEiLOIPv4NetworkSetting -Connection $iloConnection -InterfaceType Shared -WarningAction SilentlyContinue
$dedicatedIloNic = Get-HPEiLOIPv4NetworkSetting -Connection $iloConnection -InterfaceType Dedicated -WarningAction SilentlyContinue

best regards Dietmar