Aussie owned and operated, with 23+ years of industry experience, Gold Coast InfoTech is delighted to support all of your business technology requirements.

Gallery

Contacts

success@goldcoastinfotech.com.au

1800 291 071

KBArticles Scripts, Commands, Registry Uncategorized

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)

Author

Customer

Leave a comment

Your email address will not be published. Required fields are marked *