PowerShell – Add DNS Suffix to Ethernet Connections

    Notes Get-DnsClient Set-DnsClient Set-DnsClientGlobalSetting Get-DnsClientGlobalSetting Get-NetAdapter   Clear Suffix List Set-DnsClientGlobalSetting -SuffixSearchList @(“”)   Set Suffix Order Set-DnsClientGlobalSetting -SuffixSearchList @(“domain.com”, “child.domain.com”) or $DnsSuffixes = “domain.com”,”child.domain.com” Invoke-Wmimethod -Class win32_networkadapterconfiguration -Name setDNSSuffixSearchOrder -ArgumentList @($DnsSuffixes),$null   Set Suffix for Single Network Connection Get-NetAdapter | where {$_.name -ne “Local Area Connection”}| foreach{ Write-Host $_.name Set-DnsClient $_.name -ConnectionSpecificSuffix Read More …