Link to home
Start Free TrialLog in
Avatar of creative555
creative555

asked on

Help with the script to add additional method

Hi,
Could you please help me with the script below. I need to add a line that would check TCP/IP Settings option for DNS -“Register this connection’s addresses in DNS” and output the results if that option is set to true or false.


Thank you very much.




Script for network settings

      param (
    [string[]]$arrComputer="$env:computername"
)

foreach ( $Computer in $arrComputer ) {
    Get-WmiObject -ComputerName $Computer Win32_NetworkAdapterConfiguration |
     Where-Object { $_.IPAddress -ne $null } |
     Select-Object @{n="Name";e={$_.DNSHostName}},
                   @{n="NetworkCard";e={$_.Description}},
                   @{n="IP";e={$_.IPAddress}},
                   @{n="Subnet";e={$_.IpSubnet}},
                   @{n="Gateway";e={$_.DefaultIPGateway}},
                   @{n="DNS";e={$_.DNSServerSearchOrder}}
}
ASKER CERTIFIED SOLUTION
Avatar of Dan McFadden
Dan McFadden
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of creative555
creative555

ASKER

Dan,
This is awesome!! Very nice export.csv with exactly what I need. Thank you so much!!!