BladeSystem Server Blades
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

9 REPLIES
GokulKS
Trusted Contributor

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

Don't forget to give Kudos if the problem got resolved or like suggestion.
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
Trusted Contributor

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

 

Don't forget to give Kudos if the problem got resolved or like suggestion.
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
Trusted Contributor

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

Don't forget to give Kudos if the problem got resolved or like suggestion.
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

 

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
Trusted Contributor
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

Don't forget to give Kudos if the problem got resolved or like suggestion.
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.