Getmac command in Windows

The getmac command returns the media access control (MAC) address and the list of network protocols associated with each address for all network cards in the local computer or network computer.

Applies to : Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012.

The getmac command returns the media access control (MAC) address and the list of network protocols associated with each address for all network cards in the local computer or network computer.

Getmac command syntax

 getmac[.exe][/s [/u 

Parameters

Parameter Description / s Specifies the name or IP address of the remote computer (do not use a backslash). The default is the local computer. / u Run the command with the user account privileges specified by User or DomainUser. The default is the rights of the currently logged on user on the computer that is issuing the command. / p Specifies the password of the user account specified in the / u parameter . / fo {TABLE | list| list | CSV} Chỉ định định dạng để sử dụng cho đầu ra truy vấn. CSV} Specifies the format to use for the query output. Valid values ​​are TABLE ,   list and CSV. The default format for output is TABLE. / Remove the column header in the output. Valid when the / fo parameter is set to TABLE or CSV. / v Specifies that detailed information displays the output. /?

Note

The getmac command can be useful when you want to enter the MAC address into the network analyzer tool or when you need to know which protocol is currently used on each network adapter in the computer.

For example

The following examples show how you can use the getmac command :

 getmac /fo table /nh /v 
 getmac /s srvmain 
 getmac /s srvmain /u maindomhiropln 
 getmac /s srvmain /u maindomhiropln /pp@ssW23 
 getmac /s srvmain /u maindomhiropln /pp@ssW23 /fo list /v 
 getmac /s srvmain /u maindomhiropln /pp@ssW23 /fo table /nh 

See more:

  1. Fsutil command in Windows
  2. Scwcmd command in Windows
  3. The rpcping command in Windows
4.1 ★ | 7 Vote