' Enable IPSec on a Network Adapter


On Error Resume Next

Const ALLOW_ALL = 0

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
    arrPermittedTCPPorts = Array(ALLOW_ALL)
    arrPermittedUDPPorts = Array(ALLOW_ALL)
    arrPermittedIPProtocols = Array(ALLOW_ALL)
    objNetCard.EnableIPSec arrPermittedTCPPorts, arrPermittedUDPPorts, _
        arrPermittedIPProtocols
Next
search for scripts

VbsEdit contains all these sample scripts!


Download Now!



Download   Home   Scripts

Copyright © 2001-2022 adersοft