Solved

powershell script to get TCP IP settingsfor each DC to include DNS, and WINs

Posted on 2015-02-06
2
152 Views
Last Modified: 2015-02-11
Hello,
Could you please provide a script to get all TCP/IP settings that include DNS and WINs for each domain controller. Also, the script that would export the results into the excel file in a readable format. I am new to powershell, so please help.
0
Comment
Question by:creative555
2 Comments
 
LVL 53

Accepted Solution

by:
Will Szymkowski earned 500 total points
ID: 40594234
You need to first fine all of the domain controllers. Use the below command...
netdom query dc
Put those names into a text file c:\dclist.txt
Use the following powershell script to accomplish this...

$DClist = get-content "c:\dclist.txt"
Foreach ($DC in $DClist) {
Get-Wmiobject -Class Win32_NetworkAdapterConfiguration -ComputerName $DC | ? {$_.IPAddress -like "192.168.0.*"} | Select $DC, IPAddress, DefaultIPGateway, DNSDomain | out-file "c:\DCNetworkSettings.csv" -append
}

Open in new window


Make sure you change the $_.IPAddress -like "192.168.0.* to what your internal IP scheme is.

WIll.
0
 

Author Closing Comment

by:creative555
ID: 40604120
Thank you so much!!
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Set OWA language and time zone in Exchange for individuals, all users or per database.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now