Network Adapter settings with WMI, DNS Suffix

Tagged: 

This topic contains 4 replies, has 3 voices, and was last updated by Profile photo of i255d i255d 5 months, 1 week ago.

  • Author
    Posts
  • #39210
    Profile photo of i255d
    i255d
    Member

    I have a list of servers 2003 through 2012 r2 that I need to change from having a DNS suffixes order to Append primary and connection specific DNS Suffixes and check the box Append parent Suffixes of the primary DNS Suffix.

    What I would really like is to have a way to discover the answers better on my own.

    Here is me looking around:

    
    $nics = [wmiclass]'win32_Networkadapterconfiguration'
    [wmiclass]'Win32_NetworkAdapterConfiguration'
    $nics.GetMethodParameters("SetDNSSuffixSearchOrder")
    $nics | select -ExpandProperty Properties
    DNSDomainSuffixSearchOrder
    DNSServerSearchOrder
    
    
    $cimClass = Get-CimClass win32_Networkadapterconfiguration
    $cimClass.CimClassMethods
    $cimClass.CimClassMethods["SetDNSSuffixSearchOrder"].Parameters
    $cimClass.CimClassMethods["EnableDNS"].Parameters
    $cimClass.CimClassMethods["EnableDNS"].Qualifiers
    
    Get-WmiObject -Class win32_Networkadapterconfiguration
    
  • #39211
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Get-CimClass is definitely the way to go, at least one machines with PowerShell v3 or better. But, a Google for the class name will also turn up the doc page for that class, which can be just as helpful. But otherwise, what you're doing is about what I'd do.

  • #39228
    Profile photo of i255d
    i255d
    Member

    Not having much luck finding the specific settings, going to try checking and unchecking the boxes and see if I can see the differences in the settings.

  • #45161
    Profile photo of Elisabeth
    Elisabeth
    Participant

    • This reply was modified 5 months, 1 week ago by Profile photo of Elisabeth Elisabeth.
  • #45198
    Profile photo of i255d
    i255d
    Member

    Very Nice! Thanks Elisabeth.

You must be logged in to reply to this topic.