If that's referring to a few lines in some /etc/dnsmasq.d/02-custom.conf
:
That may not be necessary, as it could be achieved by correctly configuring Pi-hole's Conditional Forwarding. I emphasise correctly here, as it would seem to me that okynnor's original attempt was flawed:
So before venturing into custom configs, I'd like to resuggest trying to replace 192.168.1.1
by the respective AD's IP address in Pi-hole's Conditional Forwarding UI.