-
Notifications
You must be signed in to change notification settings - Fork 1
Get‑LinkLayerAddress
Cross-platform replacement for Get-NetNeighbor that returns the MAC address for an IP address on the local subnet/VLAN.
Get-LinkLayerAddress [-IPAddress] <String> [<CommonParameters>]
The Get-LinkLayerAddress command retrieves the Media Access Control (MAC) address for a specified IP address that is on the local subnet or VLAN. This command works across different operating systems including Windows, Linux, and macOS by using the appropriate platform-specific tools and commands to query the ARP table or neighbor cache.
Get-LinkLayerAddress -IPAddress '192.168.1.42'
Returns the MAC address for the computer with IP address 192.168.1.42 on the local subnet.
'192.168.1.10', '192.168.1.20' | Get-LinkLayerAddress
Returns the MAC addresses for multiple IP addresses using pipeline input.
Get-MacAddress -IPAddress '10.0.0.5'
Uses the alias 'Get-MacAddress' to retrieve the MAC address for IP address 10.0.0.5.
Specifies the IP address for which to retrieve the MAC address. The IP address must be on the same subnet/VLAN as the local computer and the target computer must be reachable.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The target computer must be powered on and reachable on the network for the MAC address to be retrieved successfully. This command first sends a ping to refresh the ARP table entry before attempting to retrieve the MAC address.
- Assert-GitLocalChange
- Assert-GitRemote
- Assert-IPv4Address
- Clear-AnsiSequence
- ConvertTo-AnsiSequence
- ConvertTo-AnsiString
- ConvertTo-DifferenceString
- ConvertTo-RelativePath
- Disable-CursorShortcutCode
- Get-ClassAst
- Get-ClassResourceAst
- Get-GitBranchCommit
- Get-GitLocalBranchName
- Get-GitRemote
- Get-GitRemoteBranch
- Get-GitTag
- Get-LinkLayerAddress
- Get-ModuleByVersion
- Get-ModuleFileSha
- Get-ModuleVersion
- Get-NumericalSequence
- Get-PSReadLineHistory
- Get-TextOffset
- Install-ModulePatch
- Invoke-Git
- Invoke-PesterJob
- New-GitTag
- New-SamplerGitHubReleaseTag
- Out-Difference
- Pop-VMLatestSnapshot
- Push-GitTag
- Receive-GitBranch
- Remove-GitTag
- Remove-History
- Remove-PSHistory
- Remove-PSReadLineHistory
- Rename-GitLocalBranch
- Rename-GitRemote
- Request-GitTag
- Resolve-DnsName
- Resume-GitRebase
- Send-WakeOnLan
- Split-StringAtIndex
- Start-GitRebase
- Stop-GitRebase
- Switch-GitLocalBranch
- Test-FileHash
- Test-GitLocalChanges
- Test-GitRemote
- Test-GitRemoteBranch
- Test-IPv4Address
- Update-GitLocalBranch
- Update-RemoteTrackingBranch