I used this "script" to make a text file containing all DHCP reservations, including MAC addresses. This does what I need but feel free to comment on improvements
Get-DHCPServerV4Scope | ForEach ($ScopeID) {Get-DHCPServerv4Lease -ScopeID $_.ScopeID}|where {$_.AddressState -like "*Reservation"} | Format-Table -Property ScopeId,IPAddress,HostName,ClientID,AddressState -Autosize > c:\$env:computername-Reservations.txt
In plain english:
- Uses powershell to gather all scope on the server
- For each scope returns all leases with an address state of either inactive or active reservation, this prunes regular DHCP leases
- Reorganizes the table and discards unneeded columns, then sizes so all data fits
- Outputs the data to a text file on C:\ using the computer name as part of the file name