Posted On November 4, 2021

How to Obtain Mac Address of Remote Computer

kimconnect 0 comments
blog.KimConnect.com >> Codes >> How to Obtain Mac Address of Remote Computer
# PowerShell
$computername='TESTSERVER'
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter "IPEnabled='True'" -ComputerName $computername|Select-Object -Property MACAddress, Description

# Sample output:
MACAddress        Description
----------        -----------
BC:30:5B:XX:XX:XX Intel(R) Ethernet 10G 4P X540/I350 rNDC #2
# Command-line (can also be invoked in PowerShell)
getmac.exe /s COMPUTERNAMEHERE

# Sample output:
PS C:\Windows\system32> getmac.exe /s TESTSERVER01

Physical Address    Transport Name
=================== ==========================================================
BC-30-5B-F8-XX-XX   Media disconnected
BC-30-5B-F8-XX-XX   Media disconnected
BC-30-5B-F8-XX-XX   Media disconnected
BC-30-5B-F8-XX-XX   \Device\Tcpip_{XXXXXXXX-7399-4307-87BA-XXXXXXXX}

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: How to Replace a System File – For Experimentation Purposes

# When attempting to rename a system protected file such as notepad.exe $notepadExe='C:\Windows\system32\notepad.exe' $newNotePadExe='C:\Users\rambo\Desktop\notepad.exe' rename-item…

Upgrade Virtual Hardware Version in VMM

The following script will upgrade all guest virtual machines from a lower version to the…

PowerShell: Update a List of Multiple Windows Machines

Version 3: # updateWindowsList.ps1 # Version 0.0.3 # # Features: # - New feature over…