Query DNS servers via script
I'm running a mixture of Windows 2003 and Windows 2008 servers.
I want to find out the DNS servers that these servers are using.
Is there a way to pull this centrally via some sort of script, preferably Powershell, rather than logging onto each box and checking?
August 23rd, 2011 4:00pm
Hello,
you can run ipconfig /all > ipconfig.txt command and check the output of
ipconfig.txt file on each one of these servers.
You can also try to use dnscmd commands.
More if you ask them here: http://social.technet.microsoft.com/Forums/en-US/category/scripting
This
posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
Microsoft Student
Partner 2010 / 2011
Microsoft Certified Professional
Microsoft Certified Systems Administrator:
Security
Microsoft Certified Systems Engineer:
Security
Microsoft Certified Technology Specialist:
Windows Server 2008 Active Directory, Configuration
Microsoft Certified Technology Specialist:
Windows Server 2008 Network Infrastructure, Configuration
Microsoft Certified Technology Specialist:
Windows Server 2008 Applications Infrastructure, Configuration
Microsoft Certified Technology Specialist:
Windows 7, Configuring
Microsoft Certified IT Professional: Enterprise
Administrator
Microsoft Certified IT Professional: Server Administrator
Free Windows Admin Tool Kit Click here and download it now
August 23rd, 2011 5:14pm
You can get IPCONFIG/ALL remotely using PSEXEC tool - http://technet.microsoft.com/en-US/sysinternals/bb897553.aspx
psexec \\server1 ipconfig /all
You can input server name form an input file using a batch script:
For /f %%i in (C:\Server.txt) Do (
Psexec \\%%I ipconfig /all >>output.txt
)
Santhosh Sivarajan | MCTS, MCSE (W2K3/W2K/NT4), MCSA (W2K3/W2K/MSG), CCNA, Network+ Houston, TX
Blogs - http://blogs.sivarajan.com/
Articles - http://www.sivarajan.com/publications.html
Twitter: @santhosh_sivara - http://twitter.com/santhosh_sivara
This posting is provided AS IS with no warranties,and confers no rights.
August 23rd, 2011 5:18pm