ok, looking at the codes you posted, my code does not need nothing else than the line I said it lacked.
$objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
$DNSAdapterSet = $objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE AND Description<>'PPP Adapter.' AND Description<>'Windows NT Remote Access WAN Wrapper'")

For Each $DNSAdapter In $DNSAdapterSet
$method = $DNSAdapter.Methods_.Item("SetDNSServerSearchOrder")
$inParam = $method.inParameters.SpawnInstance_()
$inParam.SetDNSServerSearchOrder="192.168.124.30","114.168.124.30"
$outParam = $DNSAdapter.ExecMethod_("SetDNSServerSearchOrder",$inParam)
$outParam.returnvalue ?
next


get $ exit 0


but, as you say, something is screwed.
it gives returnvalue of 0, thus it should work but indeed it removes all my servers [Big Grin]
_________________________
!

download KiXnet