Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Modify the DNS Suffix Search Order for All Network AdaptersContent of Modify the DNS Suffix Search Order for All Network Adapters.vbsMD5 Hash: EF41860BF93B29F38A81B311F59F0246 |
||
' Description: Configure a computer to use two DNS suffixes -- hr.fabrikam.com and research.fabrikam.com -- when performing DNS searches. Note that even if a computer uses only a single DNS suffix, this value must still be passed to the SetDNSSuffixSearchOrder method as an array (in that case, an array with a single element).
On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objNetworkSettings = objWMIService.Get("Win32_NetworkAdapterConfiguration") arrDNSSuffixes = Array("hr.fabrikam.com", "research.fabrikam.com") objNetworkSettings.SetDNSSuffixSearchOrder(arrDNSSuffixes) | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |