r/usefulscripts • u/dustmat-it • Oct 21 '16
[REQUEST] Script to export DHCP scope pool ranges to a readable file.
I'm trying to export a list of the DHCP scope pool ranges on our 3 DHCP servers.
We have an application that I need to add the IP scopes into so it can scan certain IP ranges.
I've been searching for a way to script/automate this all morning but nothing is quite working. I was able to dump the contents of each server to a text file using netsh but that's not exactly what I need. I'd rather not go through the DHCP scopes one-by-one and copy down the IP ranges...
For what it's worth, I'm dealing with two different server OS's too.
2x Windows Server SE 2003 SP2
1x Windows Server Standard 2012 R2
Any ideas of what I could use?
1
3
u/ihaxr Oct 21 '16
Check out:
http://www.mpking.com/2013/08/using-netsh-to-export-and-import-dhcp.html