MAC Address display below local IP
In the system or Summary windows display the mac address of the agent. This is good for offline as it will save it in the agent.
Here is some code for it:
$networkAdapter = Get-NetAdapter | Where-Object { $_.Status -eq 'Up' } | Sort-Object -Property 'InterfaceIndex' | Select-Object -First 1
$macAddress = $networkAdapter.MacAddress
Write-Host "MAC Address of the primary network adapter: $macAddress"
GoreloAction -SetCustomField -Name '$gorelo:asset.MacAddress' -Value $macAddress
Status: Open
Log in to comment and vote
No comments yet
Be the first to share your thoughts.