
Const NETWORK_CONNECTIONS = &H31&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(NETWORK_CONNECTIONS)

Set colItems = objFolder.Items
For Each objItem in colItems

    Set objShell = WScript.CreateObject("Wscript.Shell")
    objShell.Run "netsh interface ip set address name="""& objItem.Name &""" dhcp ", 0, True    
    objShell.Run "netsh interface ip set dns name="""& objItem.Name &""" dhcp ", 0, True
    Set objShell = Nothing

Next

    msgbox("Conexiones de red reiniciadas.")

WScript.Quit
