Get Machine ID using Command Prompt 

We can find mac address (physical address) of a computer using the command ‘getmac‘. This can be used to get mac address for remote computers also. Below are few examples on how to use this command. It works on XP, Vista, Windows 7, Server 2003 and Server 2008 operating systems.

To get mac addresses on the local computer

Just run the command getmac to get the mac addresses. Find an example below.
C:\>getmac
Physical Address    Transport Name
=================== ==========================================================
2C-3F-45-02-1B-32   \Device\Tcpip_{7E49B486-120A-4BC2-2114-B345A4D5C5}
10-13-17-BC-12-48   Media disconnected
22-B3-C5-30-76-78   \Device\Tcpip_{213E8D2A-1DBE-4240-8301-BE6F3EACAF9D}
00-05-2A-3C-78-00   \Device\Tcpip_{F01E3FC2-A5A1-6940-D1A1-C7521AEC4296}
2C-23-45-14-23-AD   Media disconnected
C:\>
This command does not show mac addresses for the network connections which are disabled. You can run ncpa.cpl and check which NICs are disabled.

Get mac address of a remote computer.

We can run the below command to retrieve the mac addresses of a remote computer.
getmac /s remote_computer /u username /p password
remote_computer : Full name of the remote computer or IP address
username and password are of the account on the remote computer.

Example:

C:\>getmac /S remotepc.domain.com  /u administrator /p adminpassword
Physical Address    Transport Name
=================== ==========================================================
22-15-25-9C-3A-29   Media disconnected
34-11-45-7A-9C-48   \Device\Tcpip_{678DD7BB-675D-4E4C-E0AE-A261490EBE8C}
If you do not want to specify the password, you can skip /p parameter. You will be prompted to enter the password and the command execution will take place after that.