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: File Copy Script using EmCopy & VSS (Legacy)

The script below is for informational purposes. Here is a better version <#.Description FileCopyScript_v1.1.8.ps1 Note: this…

PowerShell: Error when Pause is Placed Inside Function

Error: + Function Search-ScheduledTasks{+ ~Missing closing '}' in statement block or type definition.At C:\Users\kdoan\Desktop\Notes\test.ps1:57 char:1+…

PowerShell: Remove A-record in Bluecat

$bluecatUri='https://bluecat.kimconnect.com/Services/API' $bluecatUsername='bluecat-service-api' $bluecatPassword='SOMECOMPLEXPASSWORD' $hostRecord='testrecord.kimconnect.com' function loginBluecat{ param( $username, $password, $uri ) $proxy = New-WebServiceProxy -Uri…