BladeSystem - General
1748195 Members
4790 Online
108759 Solutions
New Discussion

Read MAC-Addresses from NICs with Powershell

 
SOLVED
Go to solution
Michel-CO
Occasional Advisor

Read MAC-Addresses from NICs with Powershell

Hey,

before we install a OS (RHEL / Windows) on a HPE Server (Blade / Rack / Gen8 / Gen9 / Gen10), we read out the current MAC-Addresses from each HPE Server with SSH. It is possible to read out the MAC-Addresses with new Powershell-CMDLets? I cant find a solution with powershell.

Example SSH:

Connect to ILO with SSA - /system1/network1/integrated_NICs

No we can find the MAC-Addresses from each Networkadapter.

In ILO Console we also cant find the MAC-Addresses from Server-NICs.

Thank you for reply.

10 REPLIES 10
GokulKS
HPE Pro

Re: Read MAC-Addresses from NICs with Powershell

Yes its possible using Get-HPEiLONICInfo cmdlet as show below.

Thanks,

Gokul

PS C:\WINDOWS\system32> $con = Connect-HPEiLO 15.146.44.21 admin admin123 -DisableCertificateAuthentication
PS C:\WINDOWS\system32> $n = $con | Get-HPEiLONICInfoPS C:\WINDOWS\system32> $n.EthernetInterface
NetworkPort : iLO Shared Network Port
PortDescription : iLO Shared Network Port
Location : Embedded
IPAddress : 192.16.44.21
MACAddress : 30:8d:99:b2:c9:f2
Status : OK


I am a HPE Employee

Accept or Kudo

Michel-CO
Occasional Advisor

Re: Read MAC-Addresses from NICs with Powershell

Hey Gokul,

thank you for your reply.

I have test it again, but i cant find the MACs of physical NICs. The only NIC i found is from ILO. In your Post it is also only ILO Port. I need the Networkport from Server (not ILO).

Get-HPEILONICInfo_Output.png

In the Administration Website from ILO i can find the NICs.

ILO_Screenshot_NetworkInfo.png

GokulKS
HPE Pro

Re: Read MAC-Addresses from NICs with Powershell

Hi,

I got your problem now. Only if you have AMS installed on the server host then only you will get physical NIC informaiton on iLO page or through our PS Cmdlets.

You can use same Get-HPEiLONICInfo cmdlet to fetch the physical NIC information of the server.

Hope its clear now for you.

$NIC = $con | Get-HPEiLONICInfo

$NIC.NetworkAdapter

Thanks,

Gokul

 


I am a HPE Employee

Accept or Kudo

Michel-CO
Occasional Advisor

Re: Read MAC-Addresses from NICs with Powershell

Hey,

i test ist again, but with the same result. I cant find the MAC-Addresses from phisical NICs with powershell CMDLets.

ILOPowershell_NICInfo.png

Thank you.

 

GokulKS
HPE Pro

Re: Read MAC-Addresses from NICs with Powershell

Hi,

In the output you have not expanded the Ports memeber which will have the MAC address in it.

But i strongly believe that you might not have HOST OS on your ilo server and AMS running on it. Please cross check that.

Without that you can't get MAC address of the physical server NIC.

Thanks,

Gokul


I am a HPE Employee

Accept or Kudo

Michel-CO
Occasional Advisor

Re: Read MAC-Addresses from NICs with Powershell

That's exactly my problem. I have no OS installed and therefore no AMS. With SSH (example with putty in Screenshot) I can read the MACs without an existing OS. But not with powershell (see also screenshot).

I think the Problem is only with Blades. When i try it with RACK Server (DL380 Gen10) it is possible to read out the addresses.

ILO_BL460cGen10_NIcs.png

[Moderator edit: Erased the confidential info]

Michel-CO
Occasional Advisor

Re: Read MAC-Addresses from NICs with Powershell

Here an Example from Rackserver DL380 Gen10 with Powershell:

ILO_DL380Gen10_NIcs.png

GokulKS
HPE Pro
Solution

Re: Read MAC-Addresses from NICs with Powershell

Hi,

I just got to know that MAC address data is available without Host OS and AMS. 

I tried to reproduce in my lab but could not reproduce your issue with below configuration of server. Looks like you might have not latest version.

ProLiant BL460c Gen10

iLO5 1.20 Firmware version

Can you check what is your iLO firmware version.

Thanks,

Gokul


I am a HPE Employee

Accept or Kudo

Michel-CO
Occasional Advisor

Re: Read MAC-Addresses from NICs with Powershell

Hi Gokul,

i have test it on a BL460c Gen10 with ILO Firmware 1.16. After Update to ILO 1.20 i can read out the MACs. Also via Powershell and Webinterface.

So the problem comes from the old ILO Firmware.

Thank you very much for your support and time.