Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function Get-MacAddressVendor {
Get vendor information from MAC address.
This script uses the free API from to look up vendor information for the supplied MAC address.
Author: Øyvind Kallstad
Date: 09.04.2015
Version: 1.1
param (
# MAC Address
[Parameter(Position = 0)]
[string] $MacAddress = ([System.Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces() | Where-Object {$_.OperationalStatus -eq 'Up' -and $_.NetworkInterfaceType -ne [System.Net.NetworkInformation.NetworkInterfaceType]::Loopback})[0].GetPhysicalAddress()
try {
$uri = [uri]"$($MacAddress)"
$result = Invoke-RestMethod -Uri $uri
Write-Output $result
catch {Write-Warning $_.Exception.Message}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment