This batch file is a mere collection of commands that collect network configuration settings on a Windows server, and write them to a file. This would be useful in situations such as
You need to move a server to new hardware, so you want to collect network configuration so that you can reproduce it
To check the network configuration before you run dcpromo (create a domain controller) After dcpromo : to check network configuration, in particular whether the domain controller correctly registers in DNS.
The Script is Here!!
@echo OFF
ECHO checking network configuration
REM netdiag _ saves log in current directory
Netdiag
ECHO exporting DNS settings
IF EXIST %systemroot%\system32\dns\DNS_zone.txt DEL %systemroot%\system32\dns\DNS_zone.txt
dnscmd /ZoneExport kicks.local DNS_zone.txt
dnscmd SRV01 /EnumRecords kicks.local > DNSRecords.txt
COPY %systemroot%\system32\dns\DNS_zone.txt
Echo.
Echo exporting DHCP configuration (and WINS)
netsh DHCP server dump > dhcpconf.txt
netsh WINS server dump > winsconf.txt
REM COLLECT GENERAL NETWORK SETTINGS
ipconfig /ALL > ipconf.txt
netsh dump > netdump_all.txt
ECHO done. results saved in current directory:
DIR /L /B *.txt
No comments:
Post a Comment