Workplace IT

How to get your network adapters MAC address using command prompt

Find your network adapters' MAC addresses with the getmac command in Command Prompt, including on a remote computer.

· 1 min read
Illustration of a network adapter with an Ethernet port beside a terminal window

Do you need to know your network adapters MAC address (media access control)?

You can use the command prompt to quickly retrieve your network adapters MAC address using a simple getmac command.

What’s even better, if you’re a system administrator you can also use this command to get the MAC address of a remote computer on your network.

Open Command Prompt as Administrator

Windows search for Command Prompt with Run as administrator

  1. Press the Windows Key
  2. Type cmd and press return
  3. Right Click the Command Prompt icon and select ‘ Run as Administrator’

Type the command

In the command prompt window enter the below command and press return

getmac

You’ll be given a list of network adapters installed on your computer and their unique MAC address

Command Prompt window after running getmac, with the addresses redacted in red

getmac command options

The getmac command has some advanced options that can be really helpful for running more advanced queries.

For example, if you want to run the command on a remote computer you can use the /s option followed by the computer name or IP address.

Here is a full list of parameters that can be combined with the getmac command.

GETMAC [/S system [/U username [/P [password]]]] [/FO format] [/NH] [/V]

Description: This tool enables an administrator to display the MAC address for network adapters on a system.

Parameter List: /S system Specifies the remote system to connect to.

/U     [domain\]user     Specifies the user context under
                         which the command should execute.

/P     [password]        Specifies the password for the given
                         user context. Prompts for input if omitted.

/FO    format            Specifies the format in which the output
                         is to be displayed.
                         Valid values: "TABLE", "LIST", "CSV".

/NH                      Specifies that the "Column Header" should
                         not be displayed in the output.
                         Valid only for TABLE and CSV formats.

/V                       Specifies that verbose output is displayed.

/?                       Displays this help message.

Examples: GETMAC /? GETMAC /FO csv GETMAC /S system /NH /V GETMAC /S system /U user GETMAC /S system /U domain\user /P password /FO list /V GETMAC /S system /U domain\user /P password /FO table /NH

LewisA cheeky geek, who loves a good side project. A proven IT leader with multiple strings in his bow. Particularly interested in implementing technology to streamline workloads, always on the lookout to automate processes and save time.

Keep reading