Return the Media Access Control (MAC) addresses of all NICs in the computer and the list of network protocols for each IP address. They can be returned either from the local address or through the network.
Syntax
Getmac[.exe] [/s computer [/u domain \ User [/P Password] [/FO {table | list | CSV}] [/NH] [/V]
Parameters
/S computer
Specify the remote computer name or IP address (the backslash cannot be used ). The default value is the local computer.
/U domain \ User
Run the account permission command with user or domain \ User. specified user. The default value is the user permission of the computer on which the command is currently logged on.
/P Password
Password of the user account, which is specified in the/u parameter.
/FO {table | list | CSV}
Specify the format of the query result output. Valid values are table, list, and CSV. The default output format is table.
/NH
Compress the column header in the output. This parameter is valid when the/FO parameter is set to table or CSV.
/V
Specify the output to display details.
/?
Display help at the command prompt.
Note
Getmac can be used to input the MAC address to the network analyzer or determine the Protocol for each network adapter currently used on the computer.
Example
The following example shows how to use the getmac command:
Getmac/FO table/NH/V
Getmac/s srvmain
Getmac/s srvmain/u maindom \ hiropln
Getmac/s srvmain/u maindom \ hiropln/P @ ssw23
Getmac/s srvmain/u maindom \ hiropln/P @ ssw23/FO list/V
Getmac/s srvmain/u maindom \ hiropln/P @ ssw23/FO table/NH