Skip to content

GETMAC Windows Command Guide

The Windows getmac command is a powerful tool for retrieving the Media Access Control (MAC) address of network adapters on a Windows system. By running this command in the command prompt, you can quickly access the MAC address information for all active network interfaces. This can be useful for network troubleshooting, security monitoring, and system administration tasks. The getmac command provides a simple and efficient way to gather crucial network adapter details without the need for third-party software.

Terminal window
getmac [/s Computer [/u [Domain]User [/p Password]]] [/fo {TABLE | LIST | CSV}] [/nh] [/v]
OptionDescription
/sSpecifies the remote system to connect to.
/uSpecifies the user context under which the command should execute.
/pSpecifies the password for the user context.
/foSpecifies the format for the output.
/nhSuppresses column headers in the output.
/vSpecifies that detailed information is displayed.

No Parameters for the getmac command.

Display MAC Addresses for All Network Adapters

Section titled “Display MAC Addresses for All Network Adapters”
Terminal window
getmac

Retrieves and displays the MAC addresses for all network adapters installed on the system.

Display MAC Address for a Specific Network Adapter

Section titled “Display MAC Address for a Specific Network Adapter”
Terminal window
getmac /s "Local Area Connection"

Displays the MAC address for a specific network adapter, in this case, “Local Area Connection”.

Display MAC Addresses for Remote Computers

Section titled “Display MAC Addresses for Remote Computers”
Terminal window
getmac /s COMPUTER_NAME

Retrieves and displays the MAC addresses of network adapters on a remote computer specified by “COMPUTER_NAME”.

Terminal window
getmac /v

Shows detailed information along with the MAC addresses of all network adapters.

Terminal window
getmac /fo csv > mac_addresses.csv

Saves the MAC addresses of all network adapters to a CSV file named “mac_addresses.csv”.

Terminal window
getmac /nh /v

Displays MAC addresses in a specific order by hiding the column headers (/nh) in detailed format (/v).

Display Help Information for the GETMAC Command

Section titled “Display Help Information for the GETMAC Command”
Terminal window
getmac /?

Shows the help information and usage instructions for the GETMAC command.

To use the getmac command in Windows, execute the following command:

Terminal window
getmac

What is the purpose of the getmac command?

Section titled “What is the purpose of the getmac command?”

The getmac command in Windows is used to display the Media Access Control (MAC) address and list of network adapters on a system.

How can I get the MAC addresses of remote computers using getmac?

Section titled “How can I get the MAC addresses of remote computers using getmac?”

You can get the MAC addresses of remote computers by using the following command:

Terminal window
getmac /s <remote_computer_name>

Can I export the results of the getmac command to a file?

Section titled “Can I export the results of the getmac command to a file?”

Yes, you can export the results of the getmac command to a file using output redirection in the command:

Terminal window
getmac > C:\path\to\output.txt

How do I display the MAC addresses in a specific format with getmac?

Section titled “How do I display the MAC addresses in a specific format with getmac?”

To display the MAC addresses in a specific format, you can use the “/fo” flag with options like “table”, “list”, or “csv”:

Terminal window
getmac /fo csv

Is it possible to get detailed information about network adapters with getmac?

Section titled “Is it possible to get detailed information about network adapters with getmac?”

Yes, you can get detailed information about network adapters by using the “/v” flag with the getmac command:

Terminal window
getmac /v
  • Display the MAC address of network adapters
  • Obtain the MAC address for troubleshooting network connectivity issues
  • Verify the MAC address of a computer for security purposes