Command Line to Display UUID or MAC Address of a Computer

In the event that you’re using UUID or MAC Address to uniquely identify servers in the a database (the MDT database for example) you might want a quick and easy way of getting these values from the Command Prompt on the target server/client…

UUID

wmic csproduct get "UUID" > C:\UUID.txt

MAC Address

wmic nic get "MACAddress" > C:\MAC.txt

or

ipconfig /all | find /i "phy" > C:\MAC.txt

 

/ JC

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Command Line to Display UUID or MAC Address of a Computer

  1. Graham Hope says:

    Go PowerShell JC, WMIC is good if you just want a list but If you want to know which MAC Address corresponds to which device this works and there’s lots of properties you can get other than these:

    $NIC = Get-NetAdapter
    $nic.name
    $nic.InterfaceDescription
    $nic.MacAddress

  2. Graham Hope says:

    Sorry, should have been:

    Get-NetAdapter | %{
    $nic.name
    $nic.InterfaceDescription
    $nic.MacAddress
    }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s