PowerShell – Add DNS Suffix to Ethernet Connections
Code.ps1 # SUFFIX TO ADD $Domain = ‘YourDomainHere.com’ # ONLY RETURN ETHERNET CONNECTIONS $Nic = Get-DnsClient | Where-Object -Property InterfaceAlias -Match Ethernet # ADD SUFFIX TO EACH ETHERNET CONNECTION Foreach ($N in $Nic) { Set-DnsClient -ConnectionSpecificSuffix $Domain -InterfaceIndex $N.InterfaceIndex $Alias = $N.InterfaceAlias $Index = $N.InterfaceIndex } Maximize Window Copy Code Notes Read More …