How to find VM and its IP by MAC address in vCenter when not shown in GUI

How to find VM and its IP by MAC address in vCenter when not shown in GUI?

Install the VMware.PowerCLI Tool :

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Windows\system32> Install-Module -Name VMware.PowerCLI

Untrusted repository You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from ‘PSGallery’? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “N”): a
PS C:\Windows\system32>

1. Run the PowerCLI console and connect to your vCenter server using the Connect-VIserver cmdlet:

Run using Administrator :

PS C:\Windows\system32> Connect-VIServer -Server 10.255.175.129

Name Port User
—- —- —-
10.255.175.129 443 GCLOUD.VCENTER\Administrator

2. Run the following command to find VM by MAC address:

PS C:\Windows\system32> Get-VM | Get-NetworkAdapter | Where-Object {$_.MacAddress -eq “00:50:56:97:eb:e0” } | Select-Object Parent,Name,MacAddress

Parent Name MacAddress
—— —- ———-
VM_IAUTOMATIX Network adapter 2 00:50:56:97:eb:e0

Was this article helpful?

Related Articles

Leave A Comment?