first change I need to do to this is to remove the subnet portion, and have it automagically enum all the subnets that may be on the server.

It may be possible to enum all the DHCP servers or accept multiple servers as an array, but that shouldn't be a big issue.

And I possibly could detect the local dhcp server, but this has just as much potential for remote servers as local servers, so that isn't very important
_________________________
How to ask questions the smart way <-----------> Before you ask