Which interfaces on the DHCP servers are receiving the UDP broadcast packets that the DHCP clients send when they're newly configured or when they don't get a reply to that packet? Is it only the load-balanced IP address? This will get you the information from the client machines. You can add the name of the client machine to the data by adding another key to the hash. Get the machine name from the client machines' environment variables. Package the script as a scriptblock in an Invoke-Command and use the Invoke-Commands' -ComputerName parameter with an array holding the names of all the DHCP client machines.
Get-CimInstance Win32_NetworkAdapterConfiguration |
ForEach-Object{
try{
$d = Get-NetAdapter -InterfaceDescription $_.Description -IncludeHidden -ErrorAction STOP
}
Catch{ # maybe not every "InterfaceDescription" will be found by Get-NetAdapter
$d = @{}
}
[PSCustomObject][ordered]@{
Description = $_.Description
InterfaceIndexIndex = $d.InterfaceIndex
DHCPEnabled = $_.DHCPEnabled
DHCPServer = $_.DHCPServer
DHCPLeaseObtained = $_.DHCPLeaseObtained
DHCPLeaseExpires = $_.DHCPLeaseExpires
IPAddress = $_.IPAddress
'MAC Address' = $d.MacAddress
}
}