My network serves DHCP through a Windows 2022 server. I would like to log the MAC addresses of all devices that acquire an IP address through this DHCP server. I have installed the IPAM role in the server, but I don't understand how to activate the logging. The server is standalone; it does not use Active Directory and it's not connected to a domain.
Powershell can do this for you.
In the output of this function, you will find the MAC address of the clients and the status of the leases as additional information.
This is for real time information.
You can view the logs of past events (once audit logging is enabled) via these steps:
To enable enhanced DHCP logging, perform the following steps:
Lots of good information on DHCP audit logs here.