J'ai utilisé ce vbscript qui permet de mettre en place les DNS de OpenDNS qui est un service gratuit de redirection DNS. Il se consulte via deux serveurs DNS récursifs accessibles sous les IP anycast suivantes : IPv4 : 208.67.222.222 ; 208.67.220.220; 208.67.222.220 et 208.67.220.222
Mais maintenant je cherche comment le remettre dans son état initial
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Call OpenDNS()
'*********************************************************************************
Sub OpenDNS()
On Error Resume Next
	strComputer = "."
	Set objWMIService = GetObject("winmgmts:" _
	& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
 
	Set colNetCards = objWMIService.ExecQuery _
	("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
 
	For Each objNetCard in colNetCards
		arrDNSServers = Array("208.67.222.123", "208.67.220.123")
		objNetCard.SetDNSServerSearchOrder(arrDNSServers)
		If Err = 0 Then
			MsgBox "OpenDNS est activé",VbInformation,"OpenDNS est activé"
		Else
			MsgBox Err.Decription,Vbcritical,Err.Decription
		End If	
	Next
End Sub
'*********************************************************************************