Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script for detailed address pool information

Status
Not open for further replies.

hotwired34

IS-IT--Management
Mar 9, 2007
1
US
I work at the district offices for a school board. We have over 250 locations that each have locally managed DHCP servers. I need to know the assigned address pools, including exclusion ranges for each scope on each server. Is there a way to do this from a command line or a script? I already entertained the 'netsh' command, but I couldn't get the address pool information for each scope. It gave some information, but not the information that I am looking for.

Any help would be appreciated.
Thank you.
 
netsh should give you exactly what you want, it will have to be run from one of the DHCP servers, otherwise the netsh dhcp context will not be available. Did you try:
Code:
netsh dhcp server dump >> filename.txt
Then just to filter out the junk you don't need do:
Code:
find "iprange" filename.txt >> results.txt
Results.txt will contain every scope and the address range on the selected server.

You should be able to do this against a list of servers by specifying the servername in the netsh command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top