Home » KBArticles » SCRIPT: add DNS Suffixes

SCRIPT: add DNS Suffixes

‘vbscript Set Append DNS Suffixes (in order)
On Error Resume Next
strComputer = “.”
arrNewDNSSuffixSearchOrder = Array(“internal.domain.local.1”, “internal.domain.local.2”)
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\” & strComputer & “rootcimv2”)
Set objNetworkSettings = _
 objWMIService.Get(“Win32_NetworkAdapterConfiguration”)
intSetSuffixes = _
 objNetworkSettings.SetDNSSuffixSearchOrder(arrNewDNSSuffixSearchOrder)

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.