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

How To Add or Remove a Path in Windows Environmental Paths

There are 2 functions to Add and Remove, at your convenience: # addEnvironmentalPath.ps1 $pathToAdd='C:\Scripts' $pathToRemove='C:\Scripts'…

Windows UAC Error This App has been blocked for your protection mmc.exe taskschd.msc

Error Message: User Account ControlThis App has been blocked for your protection.A administrator has blocked…

PowerShell: Assign Guest Virtual Machine to a Cloud in VMM

# assignVmsToCloud.ps1 # version 0.02 # The following function assigns a guest VM into a…